Oh, if only you'd bought Tesla Motors (TSLA -1.11%) a year, six months, three months, or even a month ago, right? The only thing that might've outperformed an investment in Tesla stock was an investment in CEO Elon Musk's ability to garner attention -- whether for a hyperloop transportation idea, launching rockets that land themselves, or proclaimingthat self-driving cars are coming in three years. But even though Musk and Tesla have soared, there might be potential for Tesla's battery supplier, Panasonic (NASDAQOTH: PCRFY), to give late-to-the-party investors a chance to grab some gains.

A written-off dog
The relevancy of the old Japanese electronics maker has been rightly questioned recently. Since 2008, Panasonic has only managed to make an annual profit once. Total revenue has declined 20% since then, mostly stung by a stunning decline in sales at its AVC segment. The AVC segment includes its consumer electronics, like cell phones, cameras, and televisions. It's no surprise that given the intense competition among these markets, a seemingly out-of-touch company couldn't compete.

However...
As out-of-touch as Panasonic seems with the hot, new gadget sector, a few of its other segments do show plenty of promise. While the company is failing at consumer electronics, it has a solid business in appliances like stoves, dishwashers, and air conditioners. Revenue in this segment is up 20% since 2010.

And while the appliance market might not be sufficiently flashy to inspire demand in its stock, its automotive systems just might, especially because of the company's relationship with Tesla. Since 2010, sales in this segment increased 36%, and majority of the batteries that Panasonic sells are going to Tesla.

As research firm Lux Research reports, the 16,000 Model S cars Tesla has sold equate to $400 million in revenue for Panasonic. And even though Tesla sells far fewer cars than other car companies, the fact that its cars use so many batteries has put Panasonic in the lead for automotive battery market share in the U.S.

Why is Tesla partnered with Panasonic? Back in 2010, Panasonic invested $30 million in the company (at a jealousy-inducing share price of $21.15). At the time, Tesla's viability as an upstart car company was even more questionable than it is today. Now, Panasonic and Tesla have a supplier agreement than runs through 2015, which gives Panasonic and investors plenty of time to reap some of Tesla's halo effect.

Of course, the usual risks of depending on one customer remain. Tesla could switch battery suppliers at any time, even if that requires breaking a contract or reengineering the technology (however unlikely that would be). The diversified, conglomerate nature of Panasonic also means that Tesla's impact on Panasonic's bottom line won't be massive.

Nonetheless, for a company that many think should have been written off after a string of losses, Panasonic makes for an interesting potential turnaround story built on future trends of energy solutions.