From: Jonathan Cameron <jic23@kernel.org>
To: <cy_huang@richtek.com>
Cc: "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Rob Herring" <robh+dt@kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] iio: adc: rtq6056: Add support for the whole RTQ6056 family
Date: Sun, 7 Jan 2024 16:19:49 +0000 [thread overview]
Message-ID: <20240107161949.04ec0011@jic23-huawei> (raw)
In-Reply-To: <2980b67de00bae1fc25004188e8aabf53073d940.1704357933.git.cy_huang@richtek.com>
On Thu, 4 Jan 2024 17:03:31 +0800
<cy_huang@richtek.com> wrote:
> From: ChiYuan Huang <cy_huang@richtek.com>
>
> RTQ6053 and RTQ6059 are the same series of RTQ6056.
>
> The respective differences with RTQ6056 are listed below
> RTQ6053
> - chip package type
>
> RTQ6059
> - Reduce the pinout for vbus sensing pin
> - Some internal ADC scaling change
>
> Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Hi.
One last follow on comment based on v4 changes to the enum naming.
I think you missed one place they should be updated - the reg_field
definitions.
Thanks,
Jonathan
>
> +/*
> + * The enum is to present the 0x00 CONFIG RG bitfield for the 16bit RG value
> + * field value order from LSB to MSB
> + * RTQ6053/6 is OPMODE->VSHUNTCT->VBUSCT->AVG->RESET
> + * RTQ6059 is OPMODE->SADC->BADC->PGA->RESET
> + */
> enum {
> F_OPMODE = 0,
> F_VSHUNTCT,
> + F_RTQ6059_SADC = F_VSHUNTCT,
> F_VBUSCT,
> + F_RTQ6059_BADC = F_VBUSCT,
> F_AVG,
> + F_RTQ6059_PGA = F_AVG,
> F_RESET,
> F_MAX_FIELDS
> };
>
> +static const struct reg_field rtq6059_reg_fields[F_MAX_FIELDS] = {
> + [F_OPMODE] = REG_FIELD(RTQ6056_REG_CONFIG, 0, 2),
> + [F_VSHUNTCT] = REG_FIELD(RTQ6056_REG_CONFIG, 3, 6),
> + [F_VBUSCT] = REG_FIELD(RTQ6056_REG_CONFIG, 7, 10),
> + [F_AVG] = REG_FIELD(RTQ6056_REG_CONFIG, 11, 12),
> + [F_RESET] = REG_FIELD(RTQ6056_REG_CONFIG, 15, 15),
Given these are the rtq6059 regfield definitions should they not be
using the new enum names?
> +};
> +
prev parent reply other threads:[~2024-01-07 16:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 9:03 [PATCH v4 0/2] RTQ6056: Add compatible for the same chip family cy_huang
2024-01-04 9:03 ` [PATCH v4 1/2] dt-bindings: iio: adc: rtq6056: add support for the whole RTQ6056 family cy_huang
2024-01-04 9:03 ` [PATCH v4 2/2] iio: adc: rtq6056: Add " cy_huang
2024-01-07 16:19 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240107161949.04ec0011@jic23-huawei \
--to=jic23@kernel.org \
--cc=conor+dt@kernel.org \
--cc=cy_huang@richtek.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.