Re: [RESEND PATCH v3 2/2] NFC: nxp-nci: Add pad supply voltage pvdd-supply

From: Krzysztof Kozlowski
Date: Fri Jun 09 2023 - 15:32:28 EST


On 09/06/2023 20:37, Raymond Hackley wrote:
> PN547/553, QN310/330 chips on some devices require a pad supply voltage
> (PVDD). Otherwise, the NFC won't power up.
>
> Implement support for pad supply voltage pvdd-supply that is enabled by
> the nxp-nci driver so that the regulator gets enabled when needed.
>
> Signed-off-by: Raymond Hackley <raymondhackley@xxxxxxxxxxxxxx>
> ---
> drivers/nfc/nxp-nci/i2c.c | 34 ++++++++++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
>
> diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
> index d4c299be7949..6f01152d2c83 100644
> --- a/drivers/nfc/nxp-nci/i2c.c
> +++ b/drivers/nfc/nxp-nci/i2c.c
> @@ -35,6 +35,7 @@ struct nxp_nci_i2c_phy {
>
> struct gpio_desc *gpiod_en;
> struct gpio_desc *gpiod_fw;
> + struct regulator *pvdd;
>
> int hard_fault; /*
> * < 0 if hardware error occurred (e.g. i2c err)
> @@ -263,6 +264,20 @@ static const struct acpi_gpio_mapping acpi_nxp_nci_gpios[] = {
> { }
> };
>
> +static void nxp_nci_i2c_poweroff(void *data)
> +{
> + struct nxp_nci_i2c_phy *phy = data;
> + struct device *dev = &phy->i2c_dev->dev;
> + struct regulator *pvdd = phy->pvdd;
> + int r;
> +
> + if (!IS_ERR(pvdd) && regulator_is_enabled(pvdd)) {
> + r = regulator_disable(pvdd);
> + if (r < 0)
> + dev_warn(dev, "Failed to disable regulator pvdd: %d\n", r);

Why resending? This should be explained.

It's like third or fourth patchset today. You need to slow down.
Unresolved comments from v2, so I still don't agree with this. I don't
like that I have to write the same three times because you sent three
patchsets...

Best regards,
Krzysztof