Samsung's Galaxy S7 and Galaxy S7 Edge. In North America, both handsets are powered by Qualcomm's Snapdragon 820. Source: Samsung

Qualcomm (QCOM -1.75%) and Samsung (NASDAQOTH: SSNLF) are back together.

The Korean tech giant's current flagship handset, the Galaxy S7, is powered by Qualcomm's latest processor, the Snapdragon 820. It's a major win for Qualcomm, as the company was notably devastated by Samsung's decision to forsake the firm's silicon for its 2015 flagship.

The Snapdragon 810 burned Qualcomm shareholders in 2015
Qualcomm's top mobile processor of 2015, the Snapdragon 810, was poorly received. Reports of overheating plagued the chip, and though it made its way into several handsets, other vendors went in a different direction.

Since the debut of the Galaxy SII in 2011, Samsung had used Qualcomm's processors and modems in all of its flagship handsets. The Galaxy SIII, Galaxy S4, and Galaxy S5 shipped with Qualcomm CPUs and modems in North America, and Qualcomm's shareholders benefited. From 2011 to 2014, Qualcomm kept pace with the broader S&P 500 on a total return basis, rising around 56%.

Since, then, however, the stock has moved lower, losing about one-quarter of its value over the last two years, with most of that loss coming in 2015. Reports began to surface in January that Samsung was poised to move away from Qualcomm, favoring its own chips for its (then) forthcoming Galaxy S6. Those reports were confirmed in March when the phone was finally unveiled. Given Samsung's size (it's the largest seller of smartphones in the world) analysts began to fear the worst and some downgraded the firm. Other vendors stuck by Qualcomm, but opted to use its lower-end chips. Rather than use Qualcomm's Snapdragon 810 to power its 2015 flagship, the G4, LG chose Qualcomm's slightly slower Snapdragon 808. Several poor earnings reports followed, and Qualcomm ultimately closed the year down more than 30%.

Qualcomm enjoyed strong revenue growth in 2013 and 2014, with its annual sales rising 30% and 7%, respectively. But in fiscal year 2015, its revenue slid 5%. In total, Qualcomm's chip sales actually rose, from 861 million in its fiscal 2014 year to 932 million in fiscal year 2015; still, its chip business performed poorly. Writing in its annual report, Qualcomm noted:

"Despite the increase in [chip] shipments, [our chip business] revenues decreased by 8%, and its earnings before taxes as a percentage of revenues decreased to 14% from 20% in fiscal 2014, primarily due to the effects of a shift in share among our customers within the premium tier, which reduced our sales of integrated Snapdragon processors and skewed our product mix toward lower-margin modem chipsets in this tier, a decline in share at a large customer [read: Samsung] and the competitive environment in China."

Snapdragon is back on top
But Qualcomm shouldn't have that problem in 2016. The Galaxy S7 isn't the only Android flagship making use of Qualcomm's latest silicon -- LG's G5 will also use the chip, as will Xiaomi's Mi 5.

That said, it shouldn't have been too much of a surprise for Qualcomm investors. Throughout 2015, management attempted to allay investors' fears, arguing that it could win Samsung back. Ahead of the Galaxy Note 5's debut last fall, Qualcomm's CEO Steve Mollenkopf was asked about the prospects for a Snapdragon-equipped Samsung phablet in 2015. Mollenkopf was dismissive, but hinted at a win for the S7. "Next design cycle ... I think we feel that we have a very competitive roadmap," he said. Some investors may have discounted Mollenkopf's confidence, but news of Snapdragon-powered Galaxy S7 wasn't a total shock.

Qualcomm shares have risen more than 20% in the last month, but could move even higher if the Galaxy S7 sells well. Even if it doesn't, Qualcomm could still benefit if one of the Galaxy S7's many Snapdragon 820-equipped rivals takes share.

Qualcomm's turnaround isn't complete (the company projected further sales declines last quarter) but its chip business is in much better shape than it was last year.