If, like me, you think of op-amps and some National Instruments analog-to-digital converters when you think of Analog Devices, you might be wondering what they're doing writing Linux drivers. The short answer is they're acquiring IP: They've bought Linear Technology (which makes tons of PMIC devices) and Maxim Integrated, who make tons of specialized PMIC, analog, RTC, interface, and other chips.
The link above is a press release, the full list of devices is here:
Part numbers prefixed with "LTC" are from Linear Tech, part numbers prefixed with "MAX" are Maxim, part numbers prefixed with "AD" are Analog Devices. Part numbers prefixed with "DS" are from Dallas Semiconductor, which was bought by Maxim a long time ago.
As someone who typically uses these devices in much smaller embedded systems, it's nice to have these hardware abstraction layers listed in one place, instead of having to transcribe it from the datasheet.
This is the next logical step for semiconductor companies like AD, TI, etc.
AD doesn't tend to compete on cost, so high quality open source drivers become a key differentiator compared to other companies with lower cost parts, especially as these parts become increasingly complex. A 9 axis IMU with 10 different acquisition and buffering modes, built in algorithms, etc. becomes a lot more tractable if you don't have to write the whole driver from a datasheet.
Actually I think their plan is to continue not competing by acquiring all competition, as is now the norm in the semiconductor business. They call it "consolidation" but lets not mistake it for what it is.
Yes - the list on https://wiki.analog.com/linux is a consolidated list:
- ADI devices (there is only one ADI, when a company is acquired, they are integrated - the group inside ADI that writes drivers doesn't care what the part prefix is)
- internal ADI development and upstreamed/mainlined drivers that have been done by our customers / other contributors
It was done this way to try to make it easier for people to find the drivers, rather than rolling through kernel source. The Majority of the drivers are upstream (including the ones ADI writes), or are in process of going upstream, but some drivers - because of their development flow - will never meet upstream kernel coding guidelines.
The core SOC is a TI chip, but at least at the time while TI wasn't abhorrent, anything that might remotely help get the USB port working was a proprietary blob. I think they'd also sold the IP for that product to someone else by the time I was tinkering with it; I can't remember exactly but do recall it was either a nightmare or impossible to get a copy of the source code for the factory firmware.
This has turned me off to anything even using TI chips that I'm aware of. Maybe they've gotten better in the last decade. Probably they're fine if you're a hardware manufacturer paying for chips.
If, like me, you think of op-amps and some National Instruments analog-to-digital converters when you think of Analog Devices, you might be wondering what they're doing writing Linux drivers
That's a pretty dated view of ADI's business.
These days they make most of their cheddar in their high speed data converter business. They have GSPS ADCs and DACs available that are hundreds of dollars per chip.
The Kuiper Linux support for Xilinx Zynq and MPSoC is telling. That's coded language for 5G physical layer and electronic warfare/SIGINT uses.
I know it's a pretty dated view, but is it really true that most of their...profits? revenue? are in the high-speed high-dollar data converter segment? Sure, one of those chips might cost as much as a reel of other chips, but for every van with a SIGINT box, there are thousands of civilian electronic devices.
High speed A/D and D/A is a big research driver to much of their business. The advances they make in gigasample D/A fabrication, can apply across a wide range of their product portfolio. The cutting edge chips may not represent a huge chunk of silicon volume, but they are a big driver of profitability. The volume is also likely a lot higher than you realize: these ADCs/DACs are ubiquitous in modern digital radars of the type preferred by the US military.
It also forms a big part of their business to sell associated components that complement the converters: clock sources, PLLs, some discrete RF, etc.
>The Kuiper Linux support for Xilinx Zynq and MPSoC is telling.
You missed the Intel SoC and Raspberry Pi support too. :)
According to the Annual Report [1] - ADI works with 125,000+ customers. That means diversity in application. The press release was focused on Linux, but there are a lot of other ecosystems that ADI also participates in - from Arduino to Pmod to No-OS to Mbed and more.
Oh man, c'mon. That kind of thing bugs me. Just "return reg == LTC_REG_CONFIG" already, sheesh. (And maybe make it a preprocessor directive while you're at it?)
Int-> bool conversion is something that MSVC complained about (C4800) for the longest time for some kind of obscure reason. Wouldn’t surprise me if this code was written against a longer that had a similar warning OR that maybe this code is shared with their Windows driver and this needs to compile on both (at least that’s my attempt at finding the most generous explanation for that).
void foo(bool bar)
{
}
int main(void)
{
foo("Whose bright idea was this?");
}
No error, not even a warning, perfectly legit code. If bar had been declared int or char, you'd get an error. Instead, your code ends up less safe because you used bool, thinking you were doing the right thing. Yes, they wanted to allow it anywhere a conditional expression would fit, but implicit conversion from anything other than int and char would have been a good place to draw the line.
So I wouldn't be surprised if the GP example was prompted by a similar design flaw in either the language or a particular compiler.
> The == (equal to) and != (not equal to) operators are analogous to the relational operators except for their lower precedence. Each of the operators yields 1 if the specified relation is true and 0 if it is false. The result has type int. For any pair of operands, exactly one of the relations is true.
It's not really an explanation though. It's how the language should work.
That ternary operator "?" is just an if-statement which should have the same "problem" with an int argument. It is a broken compiler that would complain about an if statement but an identical ?-statement.
If the int nature of equals-to was a problem, you'd have to use limit its use to switch statements.
There's no problem with the "int argument". (Not sure if you mean the function argument ("reg") or the operand of the conditional operator, but either way not a problem.) The conflict is between the declared return type of the function and the type of the returned expression.
No, it could not. The controlling expression of any kind of conditional statement in C can be an integer. The return type of a function which returns boolean, though, should be boolean.
The strict requirement in the standard is just a 'scalar type': every conditional expression in C, even `if (true)`, technically evaluates on unequal comparison to zero. See section 6.8.4.1 "The if statement" of the standard:
This applies to ternary operators, if statements, do/while loops, for loop termination conditions, etc.
However, when defining a function that returns boolean, you've asked the compiler to make your program more strict than just returning an integer that's zero or nonzero, you're not allowed to return anything but 'true' or 'false' - no, you're not allowed to pack in error codes after the fact!
It's not possible to remember all the details of C at one time. I feel like my low-level understanding shifts over different areas over time depending on the type of work I have been doing.
Then there's living in C++ land, which is 1000 times worse.
Linear Technology? I wonder if they can be convinced to open up the source of LTSpice. I'm sure that isn't something they haven't been asked about already... but if they are willing to give such a good simulator away for free, why not show off the source as well?
if they are willing to give such a good simulator away for free, why not show off the source as well?
Because giving away the source code to their simulator doesn't make any business sense in the way giving a Linux kernel driver does.
Giving away LTSPICE is an effort to commoditize their complements. The complement to an opamp is a high quality simulation model. The complement to a high speed data converter is a working Linux driver for JESD204B. Both decrease the effort involved for ADI's customer to use ADI's parts.
Giving away LTSpice source code doesn't achieve a similar aim.
I'd be happy if they'd just open-source the UI. I couldn't care less about the simulator secret sauce, but there is no reason it has to be saddled to a user interface that makes EAGLE look sane by comparison.
I'm actually glad that they haven't overhauled the UI. It would be great if they made tiny improvements, like making the font size and color defaults more pleasant. Deep blue on black as the default plot is less than stellar.
Also, unless something has changed, ltspice is wholly written by one person.
That won't happen. They've specifically said that they maintain it because it helps them sell more product. They also encrypt their models. If they open source it, they lose both encryption and exclusivity.
The link above is a press release, the full list of devices is here:
https://wiki.analog.com/resources/tools-software/linux-drive...
Part numbers prefixed with "LTC" are from Linear Tech, part numbers prefixed with "MAX" are Maxim, part numbers prefixed with "AD" are Analog Devices. Part numbers prefixed with "DS" are from Dallas Semiconductor, which was bought by Maxim a long time ago.
As someone who typically uses these devices in much smaller embedded systems, it's nice to have these hardware abstraction layers listed in one place, instead of having to transcribe it from the datasheet.