Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 2017-05-21 16:13, Jonathan Cameron wrote: > On 21/05/17 15:06, Jonathan Cameron wrote: >> On 21/05/17 13:44, Jan Kiszka wrote: >>> On 2017-05-21 14:18, Jonathan Cameron wrote: On 21/05/17 13:17, Jonathan Cameron wrote: > On 21/05/17 12:59, Jan Kiszka wrote: >> On 2017-05-21 12:47, Jonathan Cameron wrote: >>> On 17/05/17 16:28, Jan Kiszka wrote: This is an upstream port of an IIO driver for the TI ADC108S102 and ADC128S102. The former can be found on the Intel Galileo Gen2 and the Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is included. Due to the lack of regulators under ACPI, we hard-code the voltage provided to the VA pin of the ADC to 5 V, the value used on Galileo and IOT2000. For DT usage, the regulator "vref-supply" provides this information. Note that DT usage has not been tested. Original author: Bogdan PricopPorted from Intel Galileo Gen2 BSP to Intel Yocto kernel: Todor Minchev . Signed-off-by: Jan Kiszka >>> Still an issue wrt to it being obviously correct in the ordering in >>> probe >>> and remove. >>> >>> As a reviewer I want to be able to run through each step in probe >>> and >>> compare with remove to ensure they occur in the opposite order and >>> reverse all the steps in probe. Where ever it deviates from that I >>> have >>> to think about it and we all know the last thing a reviewer with >>> a big >>> backlog of patches wants to do is to think hard ;) >>> >>> Anyhow, I've fixed up and applied to the togreg branch of iio.git >>> and >>> pushed out as testing for the autobuilders to play with it. >>> >>> Please check I haven't made a mess of it. >> >> Forgot to push? Not finding it in togreg, which is 5 days old. >> > As it says, pushed out as testing... Togreg is non rebasing so only > gets pushed out publicly once all the trivial stuff the autobuilders > find has been sorted. > > Depending on how busy I am it can be a few days before I get a chance > to push out togreg, whereas testing goes every few patches when I'm > merging stuff. Mind you I hadn't pushed that for half an hour or so hence that might have been out of date too ;) >>> >>> OK, now I see what went wrong: Please have a second look at commit >>> 52d4de2441af... ;) >>> >>> Jan >>> >> Gah! Thanks. I knew I did that initially but thought I'd unwound the >> mess. >> Seems not - here goes again for trying not to be an idiot. >> >> Thanks for pointing this mess out. > Should now all be fixed up. I pulled the messed up patch to the tip and > split it up into the original two patches. 'looks' right now I think but > if you wouldn't mind having a quick look that would be great. > Looks and works fine! Thanks, Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 2017-05-21 16:13, Jonathan Cameron wrote: > On 21/05/17 15:06, Jonathan Cameron wrote: >> On 21/05/17 13:44, Jan Kiszka wrote: >>> On 2017-05-21 14:18, Jonathan Cameron wrote: On 21/05/17 13:17, Jonathan Cameron wrote: > On 21/05/17 12:59, Jan Kiszka wrote: >> On 2017-05-21 12:47, Jonathan Cameron wrote: >>> On 17/05/17 16:28, Jan Kiszka wrote: This is an upstream port of an IIO driver for the TI ADC108S102 and ADC128S102. The former can be found on the Intel Galileo Gen2 and the Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is included. Due to the lack of regulators under ACPI, we hard-code the voltage provided to the VA pin of the ADC to 5 V, the value used on Galileo and IOT2000. For DT usage, the regulator "vref-supply" provides this information. Note that DT usage has not been tested. Original author: Bogdan Pricop Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: Todor Minchev . Signed-off-by: Jan Kiszka >>> Still an issue wrt to it being obviously correct in the ordering in >>> probe >>> and remove. >>> >>> As a reviewer I want to be able to run through each step in probe >>> and >>> compare with remove to ensure they occur in the opposite order and >>> reverse all the steps in probe. Where ever it deviates from that I >>> have >>> to think about it and we all know the last thing a reviewer with >>> a big >>> backlog of patches wants to do is to think hard ;) >>> >>> Anyhow, I've fixed up and applied to the togreg branch of iio.git >>> and >>> pushed out as testing for the autobuilders to play with it. >>> >>> Please check I haven't made a mess of it. >> >> Forgot to push? Not finding it in togreg, which is 5 days old. >> > As it says, pushed out as testing... Togreg is non rebasing so only > gets pushed out publicly once all the trivial stuff the autobuilders > find has been sorted. > > Depending on how busy I am it can be a few days before I get a chance > to push out togreg, whereas testing goes every few patches when I'm > merging stuff. Mind you I hadn't pushed that for half an hour or so hence that might have been out of date too ;) >>> >>> OK, now I see what went wrong: Please have a second look at commit >>> 52d4de2441af... ;) >>> >>> Jan >>> >> Gah! Thanks. I knew I did that initially but thought I'd unwound the >> mess. >> Seems not - here goes again for trying not to be an idiot. >> >> Thanks for pointing this mess out. > Should now all be fixed up. I pulled the messed up patch to the tip and > split it up into the original two patches. 'looks' right now I think but > if you wouldn't mind having a quick look that would be great. > Looks and works fine! Thanks, Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 21/05/17 15:06, Jonathan Cameron wrote: On 21/05/17 13:44, Jan Kiszka wrote: On 2017-05-21 14:18, Jonathan Cameron wrote: On 21/05/17 13:17, Jonathan Cameron wrote: On 21/05/17 12:59, Jan Kiszka wrote: On 2017-05-21 12:47, Jonathan Cameron wrote: On 17/05/17 16:28, Jan Kiszka wrote: This is an upstream port of an IIO driver for the TI ADC108S102 and ADC128S102. The former can be found on the Intel Galileo Gen2 and the Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is included. Due to the lack of regulators under ACPI, we hard-code the voltage provided to the VA pin of the ADC to 5 V, the value used on Galileo and IOT2000. For DT usage, the regulator "vref-supply" provides this information. Note that DT usage has not been tested. Original author: Bogdan PricopPorted from Intel Galileo Gen2 BSP to Intel Yocto kernel: Todor Minchev . Signed-off-by: Jan Kiszka Still an issue wrt to it being obviously correct in the ordering in probe and remove. As a reviewer I want to be able to run through each step in probe and compare with remove to ensure they occur in the opposite order and reverse all the steps in probe. Where ever it deviates from that I have to think about it and we all know the last thing a reviewer with a big backlog of patches wants to do is to think hard ;) Anyhow, I've fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Please check I haven't made a mess of it. Forgot to push? Not finding it in togreg, which is 5 days old. As it says, pushed out as testing... Togreg is non rebasing so only gets pushed out publicly once all the trivial stuff the autobuilders find has been sorted. Depending on how busy I am it can be a few days before I get a chance to push out togreg, whereas testing goes every few patches when I'm merging stuff. Mind you I hadn't pushed that for half an hour or so hence that might have been out of date too ;) OK, now I see what went wrong: Please have a second look at commit 52d4de2441af... ;) Jan Gah! Thanks. I knew I did that initially but thought I'd unwound the mess. Seems not - here goes again for trying not to be an idiot. Thanks for pointing this mess out. Should now all be fixed up. I pulled the messed up patch to the tip and split it up into the original two patches. 'looks' right now I think but if you wouldn't mind having a quick look that would be great. Jonathan J -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 21/05/17 15:06, Jonathan Cameron wrote: On 21/05/17 13:44, Jan Kiszka wrote: On 2017-05-21 14:18, Jonathan Cameron wrote: On 21/05/17 13:17, Jonathan Cameron wrote: On 21/05/17 12:59, Jan Kiszka wrote: On 2017-05-21 12:47, Jonathan Cameron wrote: On 17/05/17 16:28, Jan Kiszka wrote: This is an upstream port of an IIO driver for the TI ADC108S102 and ADC128S102. The former can be found on the Intel Galileo Gen2 and the Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is included. Due to the lack of regulators under ACPI, we hard-code the voltage provided to the VA pin of the ADC to 5 V, the value used on Galileo and IOT2000. For DT usage, the regulator "vref-supply" provides this information. Note that DT usage has not been tested. Original author: Bogdan Pricop Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: Todor Minchev . Signed-off-by: Jan Kiszka Still an issue wrt to it being obviously correct in the ordering in probe and remove. As a reviewer I want to be able to run through each step in probe and compare with remove to ensure they occur in the opposite order and reverse all the steps in probe. Where ever it deviates from that I have to think about it and we all know the last thing a reviewer with a big backlog of patches wants to do is to think hard ;) Anyhow, I've fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Please check I haven't made a mess of it. Forgot to push? Not finding it in togreg, which is 5 days old. As it says, pushed out as testing... Togreg is non rebasing so only gets pushed out publicly once all the trivial stuff the autobuilders find has been sorted. Depending on how busy I am it can be a few days before I get a chance to push out togreg, whereas testing goes every few patches when I'm merging stuff. Mind you I hadn't pushed that for half an hour or so hence that might have been out of date too ;) OK, now I see what went wrong: Please have a second look at commit 52d4de2441af... ;) Jan Gah! Thanks. I knew I did that initially but thought I'd unwound the mess. Seems not - here goes again for trying not to be an idiot. Thanks for pointing this mess out. Should now all be fixed up. I pulled the messed up patch to the tip and split it up into the original two patches. 'looks' right now I think but if you wouldn't mind having a quick look that would be great. Jonathan J -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 21/05/17 13:44, Jan Kiszka wrote: On 2017-05-21 14:18, Jonathan Cameron wrote: On 21/05/17 13:17, Jonathan Cameron wrote: On 21/05/17 12:59, Jan Kiszka wrote: On 2017-05-21 12:47, Jonathan Cameron wrote: On 17/05/17 16:28, Jan Kiszka wrote: This is an upstream port of an IIO driver for the TI ADC108S102 and ADC128S102. The former can be found on the Intel Galileo Gen2 and the Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is included. Due to the lack of regulators under ACPI, we hard-code the voltage provided to the VA pin of the ADC to 5 V, the value used on Galileo and IOT2000. For DT usage, the regulator "vref-supply" provides this information. Note that DT usage has not been tested. Original author: Bogdan PricopPorted from Intel Galileo Gen2 BSP to Intel Yocto kernel: Todor Minchev . Signed-off-by: Jan Kiszka Still an issue wrt to it being obviously correct in the ordering in probe and remove. As a reviewer I want to be able to run through each step in probe and compare with remove to ensure they occur in the opposite order and reverse all the steps in probe. Where ever it deviates from that I have to think about it and we all know the last thing a reviewer with a big backlog of patches wants to do is to think hard ;) Anyhow, I've fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Please check I haven't made a mess of it. Forgot to push? Not finding it in togreg, which is 5 days old. As it says, pushed out as testing... Togreg is non rebasing so only gets pushed out publicly once all the trivial stuff the autobuilders find has been sorted. Depending on how busy I am it can be a few days before I get a chance to push out togreg, whereas testing goes every few patches when I'm merging stuff. Mind you I hadn't pushed that for half an hour or so hence that might have been out of date too ;) OK, now I see what went wrong: Please have a second look at commit 52d4de2441af... ;) Jan Gah! Thanks. I knew I did that initially but thought I'd unwound the mess. Seems not - here goes again for trying not to be an idiot. Thanks for pointing this mess out. J
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 21/05/17 13:44, Jan Kiszka wrote: On 2017-05-21 14:18, Jonathan Cameron wrote: On 21/05/17 13:17, Jonathan Cameron wrote: On 21/05/17 12:59, Jan Kiszka wrote: On 2017-05-21 12:47, Jonathan Cameron wrote: On 17/05/17 16:28, Jan Kiszka wrote: This is an upstream port of an IIO driver for the TI ADC108S102 and ADC128S102. The former can be found on the Intel Galileo Gen2 and the Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is included. Due to the lack of regulators under ACPI, we hard-code the voltage provided to the VA pin of the ADC to 5 V, the value used on Galileo and IOT2000. For DT usage, the regulator "vref-supply" provides this information. Note that DT usage has not been tested. Original author: Bogdan Pricop Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: Todor Minchev . Signed-off-by: Jan Kiszka Still an issue wrt to it being obviously correct in the ordering in probe and remove. As a reviewer I want to be able to run through each step in probe and compare with remove to ensure they occur in the opposite order and reverse all the steps in probe. Where ever it deviates from that I have to think about it and we all know the last thing a reviewer with a big backlog of patches wants to do is to think hard ;) Anyhow, I've fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Please check I haven't made a mess of it. Forgot to push? Not finding it in togreg, which is 5 days old. As it says, pushed out as testing... Togreg is non rebasing so only gets pushed out publicly once all the trivial stuff the autobuilders find has been sorted. Depending on how busy I am it can be a few days before I get a chance to push out togreg, whereas testing goes every few patches when I'm merging stuff. Mind you I hadn't pushed that for half an hour or so hence that might have been out of date too ;) OK, now I see what went wrong: Please have a second look at commit 52d4de2441af... ;) Jan Gah! Thanks. I knew I did that initially but thought I'd unwound the mess. Seems not - here goes again for trying not to be an idiot. Thanks for pointing this mess out. J
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 2017-05-21 14:18, Jonathan Cameron wrote: > On 21/05/17 13:17, Jonathan Cameron wrote: >> On 21/05/17 12:59, Jan Kiszka wrote: >>> On 2017-05-21 12:47, Jonathan Cameron wrote: On 17/05/17 16:28, Jan Kiszka wrote: > This is an upstream port of an IIO driver for the TI ADC108S102 and > ADC128S102. The former can be found on the Intel Galileo Gen2 and the > Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is > included. > > Due to the lack of regulators under ACPI, we hard-code the voltage > provided to the VA pin of the ADC to 5 V, the value used on Galileo > and > IOT2000. For DT usage, the regulator "vref-supply" provides this > information. Note that DT usage has not been tested. > > Original author: Bogdan Pricop> Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: > Todor Minchev . > > Signed-off-by: Jan Kiszka Still an issue wrt to it being obviously correct in the ordering in probe and remove. As a reviewer I want to be able to run through each step in probe and compare with remove to ensure they occur in the opposite order and reverse all the steps in probe. Where ever it deviates from that I have to think about it and we all know the last thing a reviewer with a big backlog of patches wants to do is to think hard ;) Anyhow, I've fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Please check I haven't made a mess of it. >>> >>> Forgot to push? Not finding it in togreg, which is 5 days old. >>> >> As it says, pushed out as testing... Togreg is non rebasing so only >> gets pushed out publicly once all the trivial stuff the autobuilders >> find has been sorted. >> >> Depending on how busy I am it can be a few days before I get a chance >> to push out togreg, whereas testing goes every few patches when I'm >> merging stuff. > Mind you I hadn't pushed that for half an hour or so hence that might > have been out of date too ;) OK, now I see what went wrong: Please have a second look at commit 52d4de2441af... ;) Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 2017-05-21 14:18, Jonathan Cameron wrote: > On 21/05/17 13:17, Jonathan Cameron wrote: >> On 21/05/17 12:59, Jan Kiszka wrote: >>> On 2017-05-21 12:47, Jonathan Cameron wrote: On 17/05/17 16:28, Jan Kiszka wrote: > This is an upstream port of an IIO driver for the TI ADC108S102 and > ADC128S102. The former can be found on the Intel Galileo Gen2 and the > Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is > included. > > Due to the lack of regulators under ACPI, we hard-code the voltage > provided to the VA pin of the ADC to 5 V, the value used on Galileo > and > IOT2000. For DT usage, the regulator "vref-supply" provides this > information. Note that DT usage has not been tested. > > Original author: Bogdan Pricop > Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: > Todor Minchev . > > Signed-off-by: Jan Kiszka Still an issue wrt to it being obviously correct in the ordering in probe and remove. As a reviewer I want to be able to run through each step in probe and compare with remove to ensure they occur in the opposite order and reverse all the steps in probe. Where ever it deviates from that I have to think about it and we all know the last thing a reviewer with a big backlog of patches wants to do is to think hard ;) Anyhow, I've fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Please check I haven't made a mess of it. >>> >>> Forgot to push? Not finding it in togreg, which is 5 days old. >>> >> As it says, pushed out as testing... Togreg is non rebasing so only >> gets pushed out publicly once all the trivial stuff the autobuilders >> find has been sorted. >> >> Depending on how busy I am it can be a few days before I get a chance >> to push out togreg, whereas testing goes every few patches when I'm >> merging stuff. > Mind you I hadn't pushed that for half an hour or so hence that might > have been out of date too ;) OK, now I see what went wrong: Please have a second look at commit 52d4de2441af... ;) Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 21/05/17 13:17, Jonathan Cameron wrote: On 21/05/17 12:59, Jan Kiszka wrote: On 2017-05-21 12:47, Jonathan Cameron wrote: On 17/05/17 16:28, Jan Kiszka wrote: This is an upstream port of an IIO driver for the TI ADC108S102 and ADC128S102. The former can be found on the Intel Galileo Gen2 and the Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is included. Due to the lack of regulators under ACPI, we hard-code the voltage provided to the VA pin of the ADC to 5 V, the value used on Galileo and IOT2000. For DT usage, the regulator "vref-supply" provides this information. Note that DT usage has not been tested. Original author: Bogdan PricopPorted from Intel Galileo Gen2 BSP to Intel Yocto kernel: Todor Minchev . Signed-off-by: Jan Kiszka Still an issue wrt to it being obviously correct in the ordering in probe and remove. As a reviewer I want to be able to run through each step in probe and compare with remove to ensure they occur in the opposite order and reverse all the steps in probe. Where ever it deviates from that I have to think about it and we all know the last thing a reviewer with a big backlog of patches wants to do is to think hard ;) Anyhow, I've fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Please check I haven't made a mess of it. Forgot to push? Not finding it in togreg, which is 5 days old. As it says, pushed out as testing... Togreg is non rebasing so only gets pushed out publicly once all the trivial stuff the autobuilders find has been sorted. Depending on how busy I am it can be a few days before I get a chance to push out togreg, whereas testing goes every few patches when I'm merging stuff. Mind you I hadn't pushed that for half an hour or so hence that might have been out of date too ;) Jonathan Thanks, Jonathan Jan -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 21/05/17 13:17, Jonathan Cameron wrote: On 21/05/17 12:59, Jan Kiszka wrote: On 2017-05-21 12:47, Jonathan Cameron wrote: On 17/05/17 16:28, Jan Kiszka wrote: This is an upstream port of an IIO driver for the TI ADC108S102 and ADC128S102. The former can be found on the Intel Galileo Gen2 and the Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is included. Due to the lack of regulators under ACPI, we hard-code the voltage provided to the VA pin of the ADC to 5 V, the value used on Galileo and IOT2000. For DT usage, the regulator "vref-supply" provides this information. Note that DT usage has not been tested. Original author: Bogdan Pricop Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: Todor Minchev . Signed-off-by: Jan Kiszka Still an issue wrt to it being obviously correct in the ordering in probe and remove. As a reviewer I want to be able to run through each step in probe and compare with remove to ensure they occur in the opposite order and reverse all the steps in probe. Where ever it deviates from that I have to think about it and we all know the last thing a reviewer with a big backlog of patches wants to do is to think hard ;) Anyhow, I've fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Please check I haven't made a mess of it. Forgot to push? Not finding it in togreg, which is 5 days old. As it says, pushed out as testing... Togreg is non rebasing so only gets pushed out publicly once all the trivial stuff the autobuilders find has been sorted. Depending on how busy I am it can be a few days before I get a chance to push out togreg, whereas testing goes every few patches when I'm merging stuff. Mind you I hadn't pushed that for half an hour or so hence that might have been out of date too ;) Jonathan Thanks, Jonathan Jan -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 21/05/17 12:59, Jan Kiszka wrote: On 2017-05-21 12:47, Jonathan Cameron wrote: On 17/05/17 16:28, Jan Kiszka wrote: This is an upstream port of an IIO driver for the TI ADC108S102 and ADC128S102. The former can be found on the Intel Galileo Gen2 and the Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is included. Due to the lack of regulators under ACPI, we hard-code the voltage provided to the VA pin of the ADC to 5 V, the value used on Galileo and IOT2000. For DT usage, the regulator "vref-supply" provides this information. Note that DT usage has not been tested. Original author: Bogdan PricopPorted from Intel Galileo Gen2 BSP to Intel Yocto kernel: Todor Minchev . Signed-off-by: Jan Kiszka Still an issue wrt to it being obviously correct in the ordering in probe and remove. As a reviewer I want to be able to run through each step in probe and compare with remove to ensure they occur in the opposite order and reverse all the steps in probe. Where ever it deviates from that I have to think about it and we all know the last thing a reviewer with a big backlog of patches wants to do is to think hard ;) Anyhow, I've fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Please check I haven't made a mess of it. Forgot to push? Not finding it in togreg, which is 5 days old. As it says, pushed out as testing... Togreg is non rebasing so only gets pushed out publicly once all the trivial stuff the autobuilders find has been sorted. Depending on how busy I am it can be a few days before I get a chance to push out togreg, whereas testing goes every few patches when I'm merging stuff. Thanks, Jonathan Jan
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 21/05/17 12:59, Jan Kiszka wrote: On 2017-05-21 12:47, Jonathan Cameron wrote: On 17/05/17 16:28, Jan Kiszka wrote: This is an upstream port of an IIO driver for the TI ADC108S102 and ADC128S102. The former can be found on the Intel Galileo Gen2 and the Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is included. Due to the lack of regulators under ACPI, we hard-code the voltage provided to the VA pin of the ADC to 5 V, the value used on Galileo and IOT2000. For DT usage, the regulator "vref-supply" provides this information. Note that DT usage has not been tested. Original author: Bogdan Pricop Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: Todor Minchev . Signed-off-by: Jan Kiszka Still an issue wrt to it being obviously correct in the ordering in probe and remove. As a reviewer I want to be able to run through each step in probe and compare with remove to ensure they occur in the opposite order and reverse all the steps in probe. Where ever it deviates from that I have to think about it and we all know the last thing a reviewer with a big backlog of patches wants to do is to think hard ;) Anyhow, I've fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Please check I haven't made a mess of it. Forgot to push? Not finding it in togreg, which is 5 days old. As it says, pushed out as testing... Togreg is non rebasing so only gets pushed out publicly once all the trivial stuff the autobuilders find has been sorted. Depending on how busy I am it can be a few days before I get a chance to push out togreg, whereas testing goes every few patches when I'm merging stuff. Thanks, Jonathan Jan
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 2017-05-21 12:47, Jonathan Cameron wrote: > On 17/05/17 16:28, Jan Kiszka wrote: >> This is an upstream port of an IIO driver for the TI ADC108S102 and >> ADC128S102. The former can be found on the Intel Galileo Gen2 and the >> Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is >> included. >> >> Due to the lack of regulators under ACPI, we hard-code the voltage >> provided to the VA pin of the ADC to 5 V, the value used on Galileo and >> IOT2000. For DT usage, the regulator "vref-supply" provides this >> information. Note that DT usage has not been tested. >> >> Original author: Bogdan Pricop>> Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: >> Todor Minchev . >> >> Signed-off-by: Jan Kiszka > Still an issue wrt to it being obviously correct in the ordering in probe > and remove. > > As a reviewer I want to be able to run through each step in probe and > compare with remove to ensure they occur in the opposite order and > reverse all the steps in probe. Where ever it deviates from that I have > to think about it and we all know the last thing a reviewer with a big > backlog of patches wants to do is to think hard ;) > > Anyhow, I've fixed up and applied to the togreg branch of iio.git and > pushed out as testing for the autobuilders to play with it. > > Please check I haven't made a mess of it. Forgot to push? Not finding it in togreg, which is 5 days old. Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 2017-05-21 12:47, Jonathan Cameron wrote: > On 17/05/17 16:28, Jan Kiszka wrote: >> This is an upstream port of an IIO driver for the TI ADC108S102 and >> ADC128S102. The former can be found on the Intel Galileo Gen2 and the >> Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is >> included. >> >> Due to the lack of regulators under ACPI, we hard-code the voltage >> provided to the VA pin of the ADC to 5 V, the value used on Galileo and >> IOT2000. For DT usage, the regulator "vref-supply" provides this >> information. Note that DT usage has not been tested. >> >> Original author: Bogdan Pricop >> Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: >> Todor Minchev . >> >> Signed-off-by: Jan Kiszka > Still an issue wrt to it being obviously correct in the ordering in probe > and remove. > > As a reviewer I want to be able to run through each step in probe and > compare with remove to ensure they occur in the opposite order and > reverse all the steps in probe. Where ever it deviates from that I have > to think about it and we all know the last thing a reviewer with a big > backlog of patches wants to do is to think hard ;) > > Anyhow, I've fixed up and applied to the togreg branch of iio.git and > pushed out as testing for the autobuilders to play with it. > > Please check I haven't made a mess of it. Forgot to push? Not finding it in togreg, which is 5 days old. Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 17/05/17 16:28, Jan Kiszka wrote: This is an upstream port of an IIO driver for the TI ADC108S102 and ADC128S102. The former can be found on the Intel Galileo Gen2 and the Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is included. Due to the lack of regulators under ACPI, we hard-code the voltage provided to the VA pin of the ADC to 5 V, the value used on Galileo and IOT2000. For DT usage, the regulator "vref-supply" provides this information. Note that DT usage has not been tested. Original author: Bogdan PricopPorted from Intel Galileo Gen2 BSP to Intel Yocto kernel: Todor Minchev . Signed-off-by: Jan Kiszka Still an issue wrt to it being obviously correct in the ordering in probe and remove. As a reviewer I want to be able to run through each step in probe and compare with remove to ensure they occur in the opposite order and reverse all the steps in probe. Where ever it deviates from that I have to think about it and we all know the last thing a reviewer with a big backlog of patches wants to do is to think hard ;) Anyhow, I've fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Please check I haven't made a mess of it. Thanks, Jonathan --- Changes in v6: - plug race condition in driver unregistration .../devicetree/bindings/iio/adc/ti-adc108s102.txt | 18 ++ drivers/iio/adc/Kconfig| 12 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ti-adc108s102.c| 344 + 4 files changed, 375 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt create mode 100644 drivers/iio/adc/ti-adc108s102.c diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt new file mode 100644 index ..b4a9f58f --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt @@ -0,0 +1,18 @@ +* Texas Instruments' ADC108S102 and ADC128S102 ADC chip + +Required properties: + - compatible: Should be "ti,adc108s102" + - reg: spi chip select number for the device + - vref-supply: The regulator supply for ADC reference voltage + +Recommended properties: + - spi-max-frequency: Definition as per + Documentation/devicetree/bindings/spi/spi-bus.txt + +Example: +adc@0 { + compatible = "ti,adc108s102"; + reg = <0>; + vref-supply = <_supply>; + spi-max-frequency = <100>; +}; diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index 401f47b51d83..2cc37c4da504 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -691,6 +691,18 @@ config TI_ADC12138 This driver can also be built as a module. If so, the module will be called ti-adc12138. +config TI_ADC108S102 + tristate "Texas Instruments ADC108S102 and ADC128S102 driver" + depends on SPI + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER + help + Say yes here to build support for Texas Instruments ADC108S102 and + ADC128S102 ADC. + + To compile this driver as a module, choose M here: the module will + be called ti-adc108s102. + config TI_ADC128S052 tristate "Texas Instruments ADC128S052/ADC122S021/ADC124S021" depends on SPI diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile index 9339bec4babe..948b6b9b72c3 100644 --- a/drivers/iio/adc/Makefile +++ b/drivers/iio/adc/Makefile @@ -63,6 +63,7 @@ obj-$(CONFIG_STM32_ADC) += stm32-adc.o obj-$(CONFIG_TI_ADC081C) += ti-adc081c.o obj-$(CONFIG_TI_ADC0832) += ti-adc0832.o obj-$(CONFIG_TI_ADC12138) += ti-adc12138.o +obj-$(CONFIG_TI_ADC108S102) += ti-adc108s102.o obj-$(CONFIG_TI_ADC128S052) += ti-adc128s052.o obj-$(CONFIG_TI_ADC161S626) += ti-adc161s626.o obj-$(CONFIG_TI_ADS1015) += ti-ads1015.o diff --git a/drivers/iio/adc/ti-adc108s102.c b/drivers/iio/adc/ti-adc108s102.c new file mode 100644 index ..c8bc10da8ab3 --- /dev/null +++ b/drivers/iio/adc/ti-adc108s102.c @@ -0,0 +1,344 @@ +/* + * TI ADC108S102 SPI ADC driver + * + * Copyright (c) 2013-2015 Intel Corporation. + * Copyright (c) 2017 Siemens AG + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * This IIO device driver is designed to work with the following + * analog to digital converters from Texas Instruments: + * ADC108S102 + * ADC128S102 + * The
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 17/05/17 16:28, Jan Kiszka wrote: This is an upstream port of an IIO driver for the TI ADC108S102 and ADC128S102. The former can be found on the Intel Galileo Gen2 and the Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is included. Due to the lack of regulators under ACPI, we hard-code the voltage provided to the VA pin of the ADC to 5 V, the value used on Galileo and IOT2000. For DT usage, the regulator "vref-supply" provides this information. Note that DT usage has not been tested. Original author: Bogdan Pricop Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: Todor Minchev . Signed-off-by: Jan Kiszka Still an issue wrt to it being obviously correct in the ordering in probe and remove. As a reviewer I want to be able to run through each step in probe and compare with remove to ensure they occur in the opposite order and reverse all the steps in probe. Where ever it deviates from that I have to think about it and we all know the last thing a reviewer with a big backlog of patches wants to do is to think hard ;) Anyhow, I've fixed up and applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Please check I haven't made a mess of it. Thanks, Jonathan --- Changes in v6: - plug race condition in driver unregistration .../devicetree/bindings/iio/adc/ti-adc108s102.txt | 18 ++ drivers/iio/adc/Kconfig| 12 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ti-adc108s102.c| 344 + 4 files changed, 375 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt create mode 100644 drivers/iio/adc/ti-adc108s102.c diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt new file mode 100644 index ..b4a9f58f --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt @@ -0,0 +1,18 @@ +* Texas Instruments' ADC108S102 and ADC128S102 ADC chip + +Required properties: + - compatible: Should be "ti,adc108s102" + - reg: spi chip select number for the device + - vref-supply: The regulator supply for ADC reference voltage + +Recommended properties: + - spi-max-frequency: Definition as per + Documentation/devicetree/bindings/spi/spi-bus.txt + +Example: +adc@0 { + compatible = "ti,adc108s102"; + reg = <0>; + vref-supply = <_supply>; + spi-max-frequency = <100>; +}; diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index 401f47b51d83..2cc37c4da504 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -691,6 +691,18 @@ config TI_ADC12138 This driver can also be built as a module. If so, the module will be called ti-adc12138. +config TI_ADC108S102 + tristate "Texas Instruments ADC108S102 and ADC128S102 driver" + depends on SPI + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER + help + Say yes here to build support for Texas Instruments ADC108S102 and + ADC128S102 ADC. + + To compile this driver as a module, choose M here: the module will + be called ti-adc108s102. + config TI_ADC128S052 tristate "Texas Instruments ADC128S052/ADC122S021/ADC124S021" depends on SPI diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile index 9339bec4babe..948b6b9b72c3 100644 --- a/drivers/iio/adc/Makefile +++ b/drivers/iio/adc/Makefile @@ -63,6 +63,7 @@ obj-$(CONFIG_STM32_ADC) += stm32-adc.o obj-$(CONFIG_TI_ADC081C) += ti-adc081c.o obj-$(CONFIG_TI_ADC0832) += ti-adc0832.o obj-$(CONFIG_TI_ADC12138) += ti-adc12138.o +obj-$(CONFIG_TI_ADC108S102) += ti-adc108s102.o obj-$(CONFIG_TI_ADC128S052) += ti-adc128s052.o obj-$(CONFIG_TI_ADC161S626) += ti-adc161s626.o obj-$(CONFIG_TI_ADS1015) += ti-ads1015.o diff --git a/drivers/iio/adc/ti-adc108s102.c b/drivers/iio/adc/ti-adc108s102.c new file mode 100644 index ..c8bc10da8ab3 --- /dev/null +++ b/drivers/iio/adc/ti-adc108s102.c @@ -0,0 +1,344 @@ +/* + * TI ADC108S102 SPI ADC driver + * + * Copyright (c) 2013-2015 Intel Corporation. + * Copyright (c) 2017 Siemens AG + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * This IIO device driver is designed to work with the following + * analog to digital converters from Texas Instruments: + * ADC108S102 + * ADC128S102 + * The communication with ADC chip is via the SPI bus (mode 3). + */ + +#include
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On Thu, May 18, 2017 at 3:31 PM, Jan Kiszkawrote: > On 2017-05-18 13:07, Andy Shevchenko wrote: >> On Wed, May 17, 2017 at 6:28 PM, Jan Kiszka wrote: >>> This is an upstream port of an IIO driver for the TI ADC108S102 and >>> ADC128S102. The former can be found on the Intel Galileo Gen2 and the >>> Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is >>> included. >>> >>> Due to the lack of regulators under ACPI, we hard-code the voltage >>> provided to the VA pin of the ADC to 5 V, the value used on Galileo and >>> IOT2000. For DT usage, the regulator "vref-supply" provides this >>> information. Note that DT usage has not been tested. >>> >>> Original author: Bogdan Pricop >>> Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: >>> Todor Minchev . >>> >>> Signed-off-by: Jan Kiszka >> >> It seems you missed my tag. >> >> FWIW: >> Reviewed-by: Andy Shevchenko > > As the code changed again, I left it out. Thanks for confirming it that > it still applies! Yes, it does with the same remark about regulator API usage. -- With Best Regards, Andy Shevchenko
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On Thu, May 18, 2017 at 3:31 PM, Jan Kiszka wrote: > On 2017-05-18 13:07, Andy Shevchenko wrote: >> On Wed, May 17, 2017 at 6:28 PM, Jan Kiszka wrote: >>> This is an upstream port of an IIO driver for the TI ADC108S102 and >>> ADC128S102. The former can be found on the Intel Galileo Gen2 and the >>> Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is >>> included. >>> >>> Due to the lack of regulators under ACPI, we hard-code the voltage >>> provided to the VA pin of the ADC to 5 V, the value used on Galileo and >>> IOT2000. For DT usage, the regulator "vref-supply" provides this >>> information. Note that DT usage has not been tested. >>> >>> Original author: Bogdan Pricop >>> Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: >>> Todor Minchev . >>> >>> Signed-off-by: Jan Kiszka >> >> It seems you missed my tag. >> >> FWIW: >> Reviewed-by: Andy Shevchenko > > As the code changed again, I left it out. Thanks for confirming it that > it still applies! Yes, it does with the same remark about regulator API usage. -- With Best Regards, Andy Shevchenko
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 2017-05-18 13:07, Andy Shevchenko wrote: > On Wed, May 17, 2017 at 6:28 PM, Jan Kiszkawrote: >> This is an upstream port of an IIO driver for the TI ADC108S102 and >> ADC128S102. The former can be found on the Intel Galileo Gen2 and the >> Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is >> included. >> >> Due to the lack of regulators under ACPI, we hard-code the voltage >> provided to the VA pin of the ADC to 5 V, the value used on Galileo and >> IOT2000. For DT usage, the regulator "vref-supply" provides this >> information. Note that DT usage has not been tested. >> >> Original author: Bogdan Pricop >> Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: >> Todor Minchev . >> >> Signed-off-by: Jan Kiszka > > It seems you missed my tag. > > FWIW: > Reviewed-by: Andy Shevchenko As the code changed again, I left it out. Thanks for confirming it that it still applies! Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 2017-05-18 13:07, Andy Shevchenko wrote: > On Wed, May 17, 2017 at 6:28 PM, Jan Kiszka wrote: >> This is an upstream port of an IIO driver for the TI ADC108S102 and >> ADC128S102. The former can be found on the Intel Galileo Gen2 and the >> Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is >> included. >> >> Due to the lack of regulators under ACPI, we hard-code the voltage >> provided to the VA pin of the ADC to 5 V, the value used on Galileo and >> IOT2000. For DT usage, the regulator "vref-supply" provides this >> information. Note that DT usage has not been tested. >> >> Original author: Bogdan Pricop >> Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: >> Todor Minchev . >> >> Signed-off-by: Jan Kiszka > > It seems you missed my tag. > > FWIW: > Reviewed-by: Andy Shevchenko As the code changed again, I left it out. Thanks for confirming it that it still applies! Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On Wed, May 17, 2017 at 6:28 PM, Jan Kiszkawrote: > This is an upstream port of an IIO driver for the TI ADC108S102 and > ADC128S102. The former can be found on the Intel Galileo Gen2 and the > Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is > included. > > Due to the lack of regulators under ACPI, we hard-code the voltage > provided to the VA pin of the ADC to 5 V, the value used on Galileo and > IOT2000. For DT usage, the regulator "vref-supply" provides this > information. Note that DT usage has not been tested. > > Original author: Bogdan Pricop > Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: > Todor Minchev . > > Signed-off-by: Jan Kiszka It seems you missed my tag. FWIW: Reviewed-by: Andy Shevchenko > --- > > Changes in v6: > - plug race condition in driver unregistration > > .../devicetree/bindings/iio/adc/ti-adc108s102.txt | 18 ++ > drivers/iio/adc/Kconfig| 12 + > drivers/iio/adc/Makefile | 1 + > drivers/iio/adc/ti-adc108s102.c| 344 > + > 4 files changed, 375 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt > create mode 100644 drivers/iio/adc/ti-adc108s102.c > > diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt > b/Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt > new file mode 100644 > index ..b4a9f58f > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt > @@ -0,0 +1,18 @@ > +* Texas Instruments' ADC108S102 and ADC128S102 ADC chip > + > +Required properties: > + - compatible: Should be "ti,adc108s102" > + - reg: spi chip select number for the device > + - vref-supply: The regulator supply for ADC reference voltage > + > +Recommended properties: > + - spi-max-frequency: Definition as per > + Documentation/devicetree/bindings/spi/spi-bus.txt > + > +Example: > +adc@0 { > + compatible = "ti,adc108s102"; > + reg = <0>; > + vref-supply = <_supply>; > + spi-max-frequency = <100>; > +}; > diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig > index 401f47b51d83..2cc37c4da504 100644 > --- a/drivers/iio/adc/Kconfig > +++ b/drivers/iio/adc/Kconfig > @@ -691,6 +691,18 @@ config TI_ADC12138 > This driver can also be built as a module. If so, the module will be > called ti-adc12138. > > +config TI_ADC108S102 > + tristate "Texas Instruments ADC108S102 and ADC128S102 driver" > + depends on SPI > + select IIO_BUFFER > + select IIO_TRIGGERED_BUFFER > + help > + Say yes here to build support for Texas Instruments ADC108S102 and > + ADC128S102 ADC. > + > + To compile this driver as a module, choose M here: the module will > + be called ti-adc108s102. > + > config TI_ADC128S052 > tristate "Texas Instruments ADC128S052/ADC122S021/ADC124S021" > depends on SPI > diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile > index 9339bec4babe..948b6b9b72c3 100644 > --- a/drivers/iio/adc/Makefile > +++ b/drivers/iio/adc/Makefile > @@ -63,6 +63,7 @@ obj-$(CONFIG_STM32_ADC) += stm32-adc.o > obj-$(CONFIG_TI_ADC081C) += ti-adc081c.o > obj-$(CONFIG_TI_ADC0832) += ti-adc0832.o > obj-$(CONFIG_TI_ADC12138) += ti-adc12138.o > +obj-$(CONFIG_TI_ADC108S102) += ti-adc108s102.o > obj-$(CONFIG_TI_ADC128S052) += ti-adc128s052.o > obj-$(CONFIG_TI_ADC161S626) += ti-adc161s626.o > obj-$(CONFIG_TI_ADS1015) += ti-ads1015.o > diff --git a/drivers/iio/adc/ti-adc108s102.c b/drivers/iio/adc/ti-adc108s102.c > new file mode 100644 > index ..c8bc10da8ab3 > --- /dev/null > +++ b/drivers/iio/adc/ti-adc108s102.c > @@ -0,0 +1,344 @@ > +/* > + * TI ADC108S102 SPI ADC driver > + * > + * Copyright (c) 2013-2015 Intel Corporation. > + * Copyright (c) 2017 Siemens AG > + * > + * This program is free software; you can redistribute it and/or modify it > + * under the terms and conditions of the GNU General Public License, > + * version 2, as published by the Free Software Foundation. > + * > + * This program is distributed in the hope it will be useful, but WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for > + * more details. > + * > + * This IIO device driver is designed to work with the following > + * analog to digital converters from Texas Instruments: > + * ADC108S102 > + * ADC128S102 > + * The communication with ADC chip is via the SPI bus (mode 3). > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +/* > + * In case of ACPI, we use the hard-wired 5000 mV of the
Re: [PATCH v6] iio: adc: Add support for TI ADC108S102 and ADC128S102
On Wed, May 17, 2017 at 6:28 PM, Jan Kiszka wrote: > This is an upstream port of an IIO driver for the TI ADC108S102 and > ADC128S102. The former can be found on the Intel Galileo Gen2 and the > Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is > included. > > Due to the lack of regulators under ACPI, we hard-code the voltage > provided to the VA pin of the ADC to 5 V, the value used on Galileo and > IOT2000. For DT usage, the regulator "vref-supply" provides this > information. Note that DT usage has not been tested. > > Original author: Bogdan Pricop > Ported from Intel Galileo Gen2 BSP to Intel Yocto kernel: > Todor Minchev . > > Signed-off-by: Jan Kiszka It seems you missed my tag. FWIW: Reviewed-by: Andy Shevchenko > --- > > Changes in v6: > - plug race condition in driver unregistration > > .../devicetree/bindings/iio/adc/ti-adc108s102.txt | 18 ++ > drivers/iio/adc/Kconfig| 12 + > drivers/iio/adc/Makefile | 1 + > drivers/iio/adc/ti-adc108s102.c| 344 > + > 4 files changed, 375 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt > create mode 100644 drivers/iio/adc/ti-adc108s102.c > > diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt > b/Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt > new file mode 100644 > index ..b4a9f58f > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt > @@ -0,0 +1,18 @@ > +* Texas Instruments' ADC108S102 and ADC128S102 ADC chip > + > +Required properties: > + - compatible: Should be "ti,adc108s102" > + - reg: spi chip select number for the device > + - vref-supply: The regulator supply for ADC reference voltage > + > +Recommended properties: > + - spi-max-frequency: Definition as per > + Documentation/devicetree/bindings/spi/spi-bus.txt > + > +Example: > +adc@0 { > + compatible = "ti,adc108s102"; > + reg = <0>; > + vref-supply = <_supply>; > + spi-max-frequency = <100>; > +}; > diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig > index 401f47b51d83..2cc37c4da504 100644 > --- a/drivers/iio/adc/Kconfig > +++ b/drivers/iio/adc/Kconfig > @@ -691,6 +691,18 @@ config TI_ADC12138 > This driver can also be built as a module. If so, the module will be > called ti-adc12138. > > +config TI_ADC108S102 > + tristate "Texas Instruments ADC108S102 and ADC128S102 driver" > + depends on SPI > + select IIO_BUFFER > + select IIO_TRIGGERED_BUFFER > + help > + Say yes here to build support for Texas Instruments ADC108S102 and > + ADC128S102 ADC. > + > + To compile this driver as a module, choose M here: the module will > + be called ti-adc108s102. > + > config TI_ADC128S052 > tristate "Texas Instruments ADC128S052/ADC122S021/ADC124S021" > depends on SPI > diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile > index 9339bec4babe..948b6b9b72c3 100644 > --- a/drivers/iio/adc/Makefile > +++ b/drivers/iio/adc/Makefile > @@ -63,6 +63,7 @@ obj-$(CONFIG_STM32_ADC) += stm32-adc.o > obj-$(CONFIG_TI_ADC081C) += ti-adc081c.o > obj-$(CONFIG_TI_ADC0832) += ti-adc0832.o > obj-$(CONFIG_TI_ADC12138) += ti-adc12138.o > +obj-$(CONFIG_TI_ADC108S102) += ti-adc108s102.o > obj-$(CONFIG_TI_ADC128S052) += ti-adc128s052.o > obj-$(CONFIG_TI_ADC161S626) += ti-adc161s626.o > obj-$(CONFIG_TI_ADS1015) += ti-ads1015.o > diff --git a/drivers/iio/adc/ti-adc108s102.c b/drivers/iio/adc/ti-adc108s102.c > new file mode 100644 > index ..c8bc10da8ab3 > --- /dev/null > +++ b/drivers/iio/adc/ti-adc108s102.c > @@ -0,0 +1,344 @@ > +/* > + * TI ADC108S102 SPI ADC driver > + * > + * Copyright (c) 2013-2015 Intel Corporation. > + * Copyright (c) 2017 Siemens AG > + * > + * This program is free software; you can redistribute it and/or modify it > + * under the terms and conditions of the GNU General Public License, > + * version 2, as published by the Free Software Foundation. > + * > + * This program is distributed in the hope it will be useful, but WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for > + * more details. > + * > + * This IIO device driver is designed to work with the following > + * analog to digital converters from Texas Instruments: > + * ADC108S102 > + * ADC128S102 > + * The communication with ADC chip is via the SPI bus (mode 3). > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +/* > + * In case of ACPI, we use the hard-wired 5000 mV of the Galileo and IOT2000 > + * boards as default for the reference pin VA. Device tree users encode that > + * via the vref-supply