* [PATCH 1/2] iio: amplifiers: hmc425a: Add Support HMC540S 4-bit Attenuator
@ 2023-08-16 11:09 Ana-Maria Cusco
2023-08-16 11:09 ` [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S Ana-Maria Cusco
2023-08-28 14:35 ` [PATCH 1/2] iio: amplifiers: hmc425a: Add Support HMC540S 4-bit Attenuator Jonathan Cameron
0 siblings, 2 replies; 8+ messages in thread
From: Ana-Maria Cusco @ 2023-08-16 11:09 UTC (permalink / raw)
To: ana-maria.cusco
Cc: Michael Hennerich, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
linux-iio, devicetree, linux-kernel
From: Michael Hennerich <michael.hennerich@analog.com>
This adds support for the Analog Devices HMC540s 1 dB LSB
Silicon MMIC 4-Bit Digital Positive Control Attenuator, 0.1 - 8 GHz
Signed-off-by: Ana-Maria Cusco <ana-maria.cusco@analog.com>
---
drivers/iio/amplifiers/hmc425a.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/iio/amplifiers/hmc425a.c b/drivers/iio/amplifiers/hmc425a.c
index 108f0f1685ef..e87d35d50a95 100644
--- a/drivers/iio/amplifiers/hmc425a.c
+++ b/drivers/iio/amplifiers/hmc425a.c
@@ -21,6 +21,7 @@
enum hmc425a_type {
ID_HMC425A,
+ ID_HMC540S,
};
struct hmc425a_chip_info {
@@ -70,6 +71,9 @@ static int hmc425a_read_raw(struct iio_dev *indio_dev,
case ID_HMC425A:
gain = ~code * -500;
break;
+ case ID_HMC540S:
+ gain = ~code * -1000;
+ break;
}
*val = gain / 1000;
@@ -106,6 +110,9 @@ static int hmc425a_write_raw(struct iio_dev *indio_dev,
case ID_HMC425A:
code = ~((abs(gain) / 500) & 0x3F);
break;
+ case ID_HMC540S:
+ code = ~((abs(gain) / 1000) & 0xF);
+ break;
}
mutex_lock(&st->lock);
@@ -157,6 +164,7 @@ static const struct iio_chan_spec hmc425a_channels[] = {
/* Match table for of_platform binding */
static const struct of_device_id hmc425a_of_match[] = {
{ .compatible = "adi,hmc425a", .data = (void *)ID_HMC425A },
+ { .compatible = "adi,hmc540s", .data = (void *)ID_HMC540S },
{},
};
MODULE_DEVICE_TABLE(of, hmc425a_of_match);
@@ -171,6 +179,15 @@ static struct hmc425a_chip_info hmc425a_chip_info_tbl[] = {
.gain_max = 0,
.default_gain = -0x40, /* set default gain -31.5db*/
},
+ [ID_HMC540S] = {
+ .name = "hmc540s",
+ .channels = hmc425a_channels,
+ .num_channels = ARRAY_SIZE(hmc425a_channels),
+ .num_gpios = 4,
+ .gain_min = -15000,
+ .gain_max = 0,
+ .default_gain = -0x10, /* set default gain -15.0db*/
+ },
};
static int hmc425a_probe(struct platform_device *pdev)
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S
2023-08-16 11:09 [PATCH 1/2] iio: amplifiers: hmc425a: Add Support HMC540S 4-bit Attenuator Ana-Maria Cusco
@ 2023-08-16 11:09 ` Ana-Maria Cusco
2023-08-16 14:36 ` Conor Dooley
2023-08-28 14:35 ` [PATCH 1/2] iio: amplifiers: hmc425a: Add Support HMC540S 4-bit Attenuator Jonathan Cameron
1 sibling, 1 reply; 8+ messages in thread
From: Ana-Maria Cusco @ 2023-08-16 11:09 UTC (permalink / raw)
To: ana-maria.cusco
Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-iio,
devicetree, linux-kernel
Added support for HMC540SLP3E broadband 4-bit Silicon IC digital
attenuator with a 15 dB control range and wide frequency coverage
(0.1 to 8 GHz).
Signed-off-by: Ana-Maria Cusco <ana-maria.cusco@analog.com>
---
.../bindings/iio/amplifiers/adi,hmc425a.yaml | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml b/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml
index 9fda56fa49c3..2ee6080deac7 100644
--- a/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml
+++ b/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml
@@ -4,20 +4,26 @@
$id: http://devicetree.org/schemas/iio/amplifiers/adi,hmc425a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: HMC425A 6-bit Digital Step Attenuator
+title: Analog Devices HMC425A and similar Digital Step Attenuators
maintainers:
- Michael Hennerich <michael.hennerich@analog.com>
description: |
- Digital Step Attenuator IIO device with gpio interface.
+ Digital Step Attenuator IIO devices with gpio interface.
+ Offer various frequency and attenuation ranges.
HMC425A 0.5 dB LSB GaAs MMIC 6-BIT DIGITAL POSITIVE CONTROL ATTENUATOR, 2.2 - 8.0 GHz
- https://www.analog.com/media/en/technical-documentation/data-sheets/hmc425A.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/hmc425A.pdf
+
+ HMC540S 1 dB LSB Silicon MMIC 4-Bit Digital Positive Control Attenuator, 0.1 - 8 GHz
+ https://www.analog.com/media/en/technical-documentation/data-sheets/hmc540s.pdf
+
properties:
compatible:
enum:
- adi,hmc425a
+ - adi,hmc540s
vcc-supply: true
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S
2023-08-16 11:09 ` [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S Ana-Maria Cusco
@ 2023-08-16 14:36 ` Conor Dooley
2023-09-12 6:36 ` Hennerich, Michael
0 siblings, 1 reply; 8+ messages in thread
From: Conor Dooley @ 2023-08-16 14:36 UTC (permalink / raw)
To: Ana-Maria Cusco
Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-iio,
devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2015 bytes --]
On Wed, Aug 16, 2023 at 02:09:06PM +0300, Ana-Maria Cusco wrote:
> Added support for HMC540SLP3E broadband 4-bit Silicon IC digital
> attenuator with a 15 dB control range and wide frequency coverage
> (0.1 to 8 GHz).
>
> Signed-off-by: Ana-Maria Cusco <ana-maria.cusco@analog.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Thanks,
Conor.
> ---
> .../bindings/iio/amplifiers/adi,hmc425a.yaml | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml b/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml
> index 9fda56fa49c3..2ee6080deac7 100644
> --- a/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml
> +++ b/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml
> @@ -4,20 +4,26 @@
> $id: http://devicetree.org/schemas/iio/amplifiers/adi,hmc425a.yaml#
> $schema: http://devicetree.org/meta-schemas/core.yaml#
>
> -title: HMC425A 6-bit Digital Step Attenuator
> +title: Analog Devices HMC425A and similar Digital Step Attenuators
>
> maintainers:
> - Michael Hennerich <michael.hennerich@analog.com>
>
> description: |
> - Digital Step Attenuator IIO device with gpio interface.
> + Digital Step Attenuator IIO devices with gpio interface.
> + Offer various frequency and attenuation ranges.
> HMC425A 0.5 dB LSB GaAs MMIC 6-BIT DIGITAL POSITIVE CONTROL ATTENUATOR, 2.2 - 8.0 GHz
> - https://www.analog.com/media/en/technical-documentation/data-sheets/hmc425A.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/hmc425A.pdf
> +
> + HMC540S 1 dB LSB Silicon MMIC 4-Bit Digital Positive Control Attenuator, 0.1 - 8 GHz
> + https://www.analog.com/media/en/technical-documentation/data-sheets/hmc540s.pdf
> +
>
> properties:
> compatible:
> enum:
> - adi,hmc425a
> + - adi,hmc540s
>
> vcc-supply: true
>
> --
> 2.34.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S
2023-08-16 14:36 ` Conor Dooley
@ 2023-09-12 6:36 ` Hennerich, Michael
2023-09-12 6:56 ` Krzysztof Kozlowski
0 siblings, 1 reply; 8+ messages in thread
From: Hennerich, Michael @ 2023-09-12 6:36 UTC (permalink / raw)
To: Conor Dooley, Cusco, Ana-Maria
Cc: Lars-Peter Clausen, Jonathan Cameron, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Conor Dooley <conor@kernel.org>
> Sent: Mittwoch, 16. August 2023 16:37
> To: Cusco, Ana-Maria <Ana-Maria.Cusco@analog.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>; Hennerich, Michael
> <Michael.Hennerich@analog.com>; Jonathan Cameron <jic23@kernel.org>;
> Rob Herring <robh+dt@kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley
> <conor+dt@kernel.org>; linux-iio@vger.kernel.org;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S
>
> [External]
>
> On Wed, Aug 16, 2023 at 02:09:06PM +0300, Ana-Maria Cusco wrote:
> > Added support for HMC540SLP3E broadband 4-bit Silicon IC digital
> > attenuator with a 15 dB control range and wide frequency coverage
> > (0.1 to 8 GHz).
> >
> > Signed-off-by: Ana-Maria Cusco <ana-maria.cusco@analog.com>
>
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
Adding missing Signed-off-by tag
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
>
> Thanks,
> Conor.
>
> > ---
> > .../bindings/iio/amplifiers/adi,hmc425a.yaml | 12 +++++++++---
> > 1 file changed, 9 insertions(+), 3 deletions(-)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml
> > b/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml
> > index 9fda56fa49c3..2ee6080deac7 100644
> > ---
> > a/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml
> > +++
> b/Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yam
> > +++ l
> > @@ -4,20 +4,26 @@
> > $id: http://devicetree.org/schemas/iio/amplifiers/adi,hmc425a.yaml#
> > $schema: http://devicetree.org/meta-schemas/core.yaml#
> >
> > -title: HMC425A 6-bit Digital Step Attenuator
> > +title: Analog Devices HMC425A and similar Digital Step Attenuators
> >
> > maintainers:
> > - Michael Hennerich <michael.hennerich@analog.com>
> >
> > description: |
> > - Digital Step Attenuator IIO device with gpio interface.
> > + Digital Step Attenuator IIO devices with gpio interface.
> > + Offer various frequency and attenuation ranges.
> > HMC425A 0.5 dB LSB GaAs MMIC 6-BIT DIGITAL POSITIVE CONTROL
> > ATTENUATOR, 2.2 - 8.0 GHz
> > -
> > https://www.analog.com/media/en/technical-documentation/data-
> sheets/hm
> > c425A.pdf
> > +
> > + https://www.analog.com/media/en/technical-documentation/data-
> sheets/
> > + hmc425A.pdf
> > +
> > + HMC540S 1 dB LSB Silicon MMIC 4-Bit Digital Positive Control
> Attenuator, 0.1 - 8 GHz
> > +
> > + https://www.analog.com/media/en/technical-documentation/data-
> sheets/
> > + hmc540s.pdf
> > +
> >
> > properties:
> > compatible:
> > enum:
> > - adi,hmc425a
> > + - adi,hmc540s
> >
> > vcc-supply: true
> >
> > --
> > 2.34.1
> >
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S
2023-09-12 6:36 ` Hennerich, Michael
@ 2023-09-12 6:56 ` Krzysztof Kozlowski
2023-09-12 9:16 ` Jonathan Cameron
0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-09-12 6:56 UTC (permalink / raw)
To: Hennerich, Michael, Conor Dooley, Cusco, Ana-Maria
Cc: Lars-Peter Clausen, Jonathan Cameron, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
On 12/09/2023 08:36, Hennerich, Michael wrote:
>
>
>> -----Original Message-----
>> From: Conor Dooley <conor@kernel.org>
>> Sent: Mittwoch, 16. August 2023 16:37
>> To: Cusco, Ana-Maria <Ana-Maria.Cusco@analog.com>
>> Cc: Lars-Peter Clausen <lars@metafoo.de>; Hennerich, Michael
>> <Michael.Hennerich@analog.com>; Jonathan Cameron <jic23@kernel.org>;
>> Rob Herring <robh+dt@kernel.org>; Krzysztof Kozlowski
>> <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley
>> <conor+dt@kernel.org>; linux-iio@vger.kernel.org;
>> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S
>>
>> [External]
>>
>> On Wed, Aug 16, 2023 at 02:09:06PM +0300, Ana-Maria Cusco wrote:
>>> Added support for HMC540SLP3E broadband 4-bit Silicon IC digital
>>> attenuator with a 15 dB control range and wide frequency coverage
>>> (0.1 to 8 GHz).
>>>
>>> Signed-off-by: Ana-Maria Cusco <ana-maria.cusco@analog.com>
>>
>> Acked-by: Conor Dooley <conor.dooley@microchip.com>
>
> Adding missing Signed-off-by tag
>
> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Why it is missing? What is the purpose of this adding?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S
2023-09-12 6:56 ` Krzysztof Kozlowski
@ 2023-09-12 9:16 ` Jonathan Cameron
2023-09-12 11:28 ` Hennerich, Michael
0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Cameron @ 2023-09-12 9:16 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Hennerich, Michael, Conor Dooley, Cusco, Ana-Maria,
Lars-Peter Clausen, Jonathan Cameron, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
On Tue, 12 Sep 2023 08:56:56 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> On 12/09/2023 08:36, Hennerich, Michael wrote:
> >
> >
> >> -----Original Message-----
> >> From: Conor Dooley <conor@kernel.org>
> >> Sent: Mittwoch, 16. August 2023 16:37
> >> To: Cusco, Ana-Maria <Ana-Maria.Cusco@analog.com>
> >> Cc: Lars-Peter Clausen <lars@metafoo.de>; Hennerich, Michael
> >> <Michael.Hennerich@analog.com>; Jonathan Cameron <jic23@kernel.org>;
> >> Rob Herring <robh+dt@kernel.org>; Krzysztof Kozlowski
> >> <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley
> >> <conor+dt@kernel.org>; linux-iio@vger.kernel.org;
> >> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
> >> Subject: Re: [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S
> >>
> >> [External]
> >>
> >> On Wed, Aug 16, 2023 at 02:09:06PM +0300, Ana-Maria Cusco wrote:
> >>> Added support for HMC540SLP3E broadband 4-bit Silicon IC digital
> >>> attenuator with a 15 dB control range and wide frequency coverage
> >>> (0.1 to 8 GHz).
> >>>
> >>> Signed-off-by: Ana-Maria Cusco <ana-maria.cusco@analog.com>
> >>
> >> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> >
> > Adding missing Signed-off-by tag
> >
> > Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
>
> Why it is missing? What is the purpose of this adding?
>
> Best regards,
> Krzysztof
>
>
Wrong patch. This is supposed to be on patch 1 where
Michael was the author (he confirmed intent in response to a
linux-next missing sign-off mail). I've added it there, but
if you can reply to that email Michael, it will make things nice
and clear.
Jonathan
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S
2023-09-12 9:16 ` Jonathan Cameron
@ 2023-09-12 11:28 ` Hennerich, Michael
0 siblings, 0 replies; 8+ messages in thread
From: Hennerich, Michael @ 2023-09-12 11:28 UTC (permalink / raw)
To: Jonathan Cameron, Krzysztof Kozlowski
Cc: Conor Dooley, Cusco, Ana-Maria, Lars-Peter Clausen,
Jonathan Cameron, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
> Sent: Dienstag, 12. September 2023 11:17
> To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Cc: Hennerich, Michael <Michael.Hennerich@analog.com>; Conor Dooley
> <conor@kernel.org>; Cusco, Ana-Maria <Ana-Maria.Cusco@analog.com>;
> Lars-Peter Clausen <lars@metafoo.de>; Jonathan Cameron
> <jic23@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley
> <conor+dt@kernel.org>; linux-iio@vger.kernel.org;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S
>
> [External]
>
> On Tue, 12 Sep 2023 08:56:56 +0200
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>
> > On 12/09/2023 08:36, Hennerich, Michael wrote:
> > >
> > >
> > >> -----Original Message-----
> > >> From: Conor Dooley <conor@kernel.org>
> > >> Sent: Mittwoch, 16. August 2023 16:37
> > >> To: Cusco, Ana-Maria <Ana-Maria.Cusco@analog.com>
> > >> Cc: Lars-Peter Clausen <lars@metafoo.de>; Hennerich, Michael
> > >> <Michael.Hennerich@analog.com>; Jonathan Cameron
> > >> <jic23@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof
> > >> Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley
> > >> <conor+dt@kernel.org>; linux-iio@vger.kernel.org;
> > >> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
> > >> Subject: Re: [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for
> > >> HMC540S
> > >>
> > >> [External]
> > >>
> > >> On Wed, Aug 16, 2023 at 02:09:06PM +0300, Ana-Maria Cusco wrote:
> > >>> Added support for HMC540SLP3E broadband 4-bit Silicon IC digital
> > >>> attenuator with a 15 dB control range and wide frequency coverage
> > >>> (0.1 to 8 GHz).
> > >>>
> > >>> Signed-off-by: Ana-Maria Cusco <ana-maria.cusco@analog.com>
> > >>
> > >> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> > >
> > > Adding missing Signed-off-by tag
> > >
> > > Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
> >
> > Why it is missing? What is the purpose of this adding?
> >
> > Best regards,
> > Krzysztof
> >
> >
>
> Wrong patch. This is supposed to be on patch 1 where Michael was the
> author (he confirmed intent in response to a linux-next missing sign-off mail).
> I've added it there, but if you can reply to that email Michael, it will make
> things nice and clear.
>
> Jonathan
Sorry - my fault.
The Signed-off-by tag should have been for patch "iio: amplifiers: hmc425a: Add Support HMC540S 4-bit Attenuator"
Regards,
Michael
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] iio: amplifiers: hmc425a: Add Support HMC540S 4-bit Attenuator
2023-08-16 11:09 [PATCH 1/2] iio: amplifiers: hmc425a: Add Support HMC540S 4-bit Attenuator Ana-Maria Cusco
2023-08-16 11:09 ` [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S Ana-Maria Cusco
@ 2023-08-28 14:35 ` Jonathan Cameron
1 sibling, 0 replies; 8+ messages in thread
From: Jonathan Cameron @ 2023-08-28 14:35 UTC (permalink / raw)
To: Ana-Maria Cusco
Cc: Michael Hennerich, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-iio, devicetree,
linux-kernel
On Wed, 16 Aug 2023 14:09:05 +0300
Ana-Maria Cusco <ana-maria.cusco@analog.com> wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
>
> This adds support for the Analog Devices HMC540s 1 dB LSB
> Silicon MMIC 4-Bit Digital Positive Control Attenuator, 0.1 - 8 GHz
>
> Signed-off-by: Ana-Maria Cusco <ana-maria.cusco@analog.com>
Hi Ana-Maria
Generally for all but single patch series, I'd prefer a cover letter.
For new drivers, just put a short description of the device in there.
There are various reasons, but the simplest one is that it provides
a place where people can offer Reviewed-by etc for the whole series
in a form that the b4 tool I (and lots of other maintainers) use can
pick it up automatically.
Anyhow, actual patches look great to me.
Applied to the togreg branch of iio.git and pushed out as testing for now.
I will be rebasing on 5.6-rc1 once it's available after which these should
get picked up by linux-next.
Thanks,
Jonathan
> ---
> drivers/iio/amplifiers/hmc425a.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/drivers/iio/amplifiers/hmc425a.c b/drivers/iio/amplifiers/hmc425a.c
> index 108f0f1685ef..e87d35d50a95 100644
> --- a/drivers/iio/amplifiers/hmc425a.c
> +++ b/drivers/iio/amplifiers/hmc425a.c
> @@ -21,6 +21,7 @@
>
> enum hmc425a_type {
> ID_HMC425A,
> + ID_HMC540S,
> };
>
> struct hmc425a_chip_info {
> @@ -70,6 +71,9 @@ static int hmc425a_read_raw(struct iio_dev *indio_dev,
> case ID_HMC425A:
> gain = ~code * -500;
> break;
> + case ID_HMC540S:
> + gain = ~code * -1000;
> + break;
> }
>
> *val = gain / 1000;
> @@ -106,6 +110,9 @@ static int hmc425a_write_raw(struct iio_dev *indio_dev,
> case ID_HMC425A:
> code = ~((abs(gain) / 500) & 0x3F);
> break;
> + case ID_HMC540S:
> + code = ~((abs(gain) / 1000) & 0xF);
> + break;
> }
>
> mutex_lock(&st->lock);
> @@ -157,6 +164,7 @@ static const struct iio_chan_spec hmc425a_channels[] = {
> /* Match table for of_platform binding */
> static const struct of_device_id hmc425a_of_match[] = {
> { .compatible = "adi,hmc425a", .data = (void *)ID_HMC425A },
> + { .compatible = "adi,hmc540s", .data = (void *)ID_HMC540S },
> {},
> };
> MODULE_DEVICE_TABLE(of, hmc425a_of_match);
> @@ -171,6 +179,15 @@ static struct hmc425a_chip_info hmc425a_chip_info_tbl[] = {
> .gain_max = 0,
> .default_gain = -0x40, /* set default gain -31.5db*/
> },
> + [ID_HMC540S] = {
> + .name = "hmc540s",
> + .channels = hmc425a_channels,
> + .num_channels = ARRAY_SIZE(hmc425a_channels),
> + .num_gpios = 4,
> + .gain_min = -15000,
> + .gain_max = 0,
> + .default_gain = -0x10, /* set default gain -15.0db*/
> + },
> };
>
> static int hmc425a_probe(struct platform_device *pdev)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-09-12 11:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-16 11:09 [PATCH 1/2] iio: amplifiers: hmc425a: Add Support HMC540S 4-bit Attenuator Ana-Maria Cusco
2023-08-16 11:09 ` [PATCH 2/2] dt-bindings: iio: hmc425a: add entry for HMC540S Ana-Maria Cusco
2023-08-16 14:36 ` Conor Dooley
2023-09-12 6:36 ` Hennerich, Michael
2023-09-12 6:56 ` Krzysztof Kozlowski
2023-09-12 9:16 ` Jonathan Cameron
2023-09-12 11:28 ` Hennerich, Michael
2023-08-28 14:35 ` [PATCH 1/2] iio: amplifiers: hmc425a: Add Support HMC540S 4-bit Attenuator Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).