Skyworks Solutions (SWKS 1.83%) and Texas Instruments (TXN 5.64%) both sell analog and embedded chips to a wide range of industries. Both chipmakers are also prominent Apple (AAPL 1.27%) suppliers, and both were lifted by the industrywide rally in semiconductors over the past year.

Skyworks rallied more than 50% over the past 12 months, while TI jumped more than 25%. But the companies are fundamentally different -- Skyworks is a smaller chipmaker that is more heavily exposed to Apple, while TI is a bigger chipmaker with a more diversified business. Let's examine both stocks to see which is the better long-term buy at current prices.

A Lego figure standing next to a circuit board.

Source: Pixabay.

How Skyworks and Texas Instruments make money

Skyworks sells power amplifiers, front-end modules, RF chips, and other components to a wide variety of customers, but its top customer is Apple -- which contributed 40% of its revenues last year. That exposure is a double-edged sword -- it makes Skyworks one of the best supply chain plays on the iPhone, but its fortunes could fade as iPhone sales peak.

Skyworks doesn't regularly break down its sales by industry, but it believes that content share gains in other phones, along with the growth of other connected devices across the Internet of Things (IoT) market, should gradually reduce its dependence on the iPhone.

Texas Instruments sells analog and embedded chips for the industrial, automotive, personal electronics, communication equipment, and enterprise systems markets. Orders from Apple generated less than 10% of TI's revenue in 2016, compared to 11% in 2015.

Much of TI's recent growth comes from the automotive and industrial markets, which respectively accounted for 18% and 33% of TI's top line last year. That growth is offsetting declines at its personal electronics and enterprise systems, as well as its slower growth in communication equipment.

Which company is growing faster?

Skyworks' revenue rose just 1% to $3.3 billion last year, mainly due to an 8% decline in iPhone shipments in 2016. Its non-GAAP earnings rose 6%. But looking ahead, analysts expect Skyworks' revenue and earnings to respectively rise 10% and 13%.

That growth is attributed to improving iPhone shipments, its content share gains in Huawei and Samsung (NASDAQOTH: SSNLF) devices, and its expansion into adjacent markets. The growing use of IoT devices like smart speakers, home automation devices, and wearables should also boost market demand for Skyworks' chips.

Apple's iPhone 7.

Source: Apple.

TI's revenue and earnings respectively rose 3% and 22% last year. Wall Street expects that growth to continue with 7% sales growth and 18% earnings growth this year.

The growing adoption of connected and driverless cars should support its automotive business, while the growing use of connected and automated machinery in various industries should boost its industrial revenues. The growth of those two core businesses should offset any major declines at its other businesses.

As for gross margins, TI easily wins that battle. That's because TI's shift to a newer 300-mm manufacturing process reduced its production costs by about 40%. Skyworks is faring well with its bundling and content share strategies, but it simply can't match TI's market-leading margins.

SWKS Gross Profit Margin (TTM) Chart

Source: YCharts

Buybacks and dividends

Skyworks and TI both spend a large portion of their free cash flows (FCF) on buybacks and dividends. Over the past 12 months, Skyworks spent 56% of its FCF on buybacks and 18% on dividends. TI spent 35% of its FCF on buybacks and 42% on dividends during that period -- although it generally aims to return 100% of its FCF to shareholders.

Both companies have plenty of room to raise their dividends, but Skyworks is probably less popular with income investors. Skyworks pays a forward yield of 1.1%, and it's raised that dividend annually for three straight years. TI pays a much higher forward yield of 2.4%, and it's hiked that payout annually for 13 straight years.

The valuations and the verdict

Skyworks trades at 21 times earnings, which is lower than the industry average of 25 for semiconductor makers. TI, which is in the same industry, has a slightly higher P/E of 22. But looking ahead, Skyworks trades at 14 times earnings, versus TI's forward P/E of 21.

Skyworks is a slightly cheaper stock, but I personally prefer TI at current prices. TI has a well-diversified business model which won't tank if the new iPhone bombs, it has solid exposure to the growing automotive and industrial IoT markets, and it pays a higher dividend. Skyworks' future looks promising, but it's a much riskier play than TI.