It's been a rough few years for Atmel (NASDAQ:ATML), but fortunately for shareholders that may be coming to an end. Dialog Semiconductor has agreed to acquire Atmel in a $4.6 billion deal that will allow Dialog to diversify its customer base and expand into adjacent markets like the automotive market.

Once upon a time, Atmel was riding high as its touchscreen microcontroller chip business was soaring within the Android camp. But as the smartphone market matured and microcontrollers became increasingly commoditized, Atmel lost pricing power and its stock has severely underperformed the market over the past 4 years.

ATML Chart

ATML data by YCharts

This deal will definitely benefit both companies.

What Atmel is getting
Under the deal's structure, Atmel shareholders will receive $4.65 per share in cash in addition to 0.112 of a Dialog American Depository Share, or ADS. Based on Dialog's closing price on Friday, that all translates into $10.42 per share in value for Atmel, which represents a 43% premium relative to where Atmel closed on Friday.

The deal is expected to close in Q1 2016, and Dialog is funding the deal with cash on hand, $2.1 billion in additional debt, and all those Dialog shares that it's giving Atmel investors (roughly 49 million shares, to be precise). After everything is said and done, Atmel shareholders will own about 38% of the new combined company.

This all comes after Atmel hired Qatalyst Partners in June to help it sell itself.

What Dialog is getting
The combined company will expand its position in power management chips and ARM-based (NASDAQ:ARMH) microcontrollers, all while strengthening the portfolios for connectivity, touch, and security. Since both businesses are highly complementary, investors can expect some healthy upselling and cross-selling opportunities.

Dialog has long relied heavily on both Apple (NASDAQ:AAPL) and Samsung, and this deal will allow the company to diversify its customer base in a meaningful way. Atmel has never been able to win any Apple business, a stark contrast to Dialog. That's just another reason why Dialog and Atmel fit together so well. Indeed, Dialog CEO Jalal Bagherli says there is only a 5% overlap between the pair's product lines.

This deal should be accretive to earnings for the full year 2017. At that point, Dialog expects annual cost synergies to be in the neighborhood of $150 million.

The great chip consolidation of 2015 continues
This year has seen the greatest merger and acquisition activity since the tech bubble. So far this year, we're talking about $80 billion worth of deals that have gone through, according to Thomson Reuters data. Avago Technologies (NASDAQ:AVGO) recently agreed to acquire Broadcom (NASDAQ:BRCM) for a massive $37 billion, NXP Semiconductor (NASDAQ:NXPI) is merging with Freescale Semiconductor (NYSE:FSL), and Intel (NASDAQ:INTC) is purchasing Altera (NASDAQ:ALTR), to name some of the headline deals year-to-date.

Might as well add another merger to the mix.

Evan Niu, CFA owns shares of Apple. The Motley Fool owns and recommends Apple and NXP Semiconductors. The Motley Fool recommends Intel. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.