Re: [PATCH v4 04/11] regulator: Introduce tps68470-regulator driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 25, 2021 at 12:41 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> The TPS68470 PMIC provides Clocks, GPIOs and Regulators. At present in
> the kernel the Regulators and Clocks are controlled by an OpRegion
> driver designed to work with power control methods defined in ACPI, but
> some platforms lack those methods, meaning drivers need to be able to
> consume the resources of these chips through the usual frameworks.
>
> This commit adds a driver for the regulators provided by the tps68470,
> and is designed to bind to the platform_device registered by the
> intel_skl_int3472 module.
>
> This is based on this out of tree driver written by Intel:
> https://github.com/intel/linux-intel-lts/blob/4.14/base/drivers/regulator/tps68470-regulator.c
> with various cleanups added.

> +struct tps68470_regulator_data {
> +       struct clk *clk;
> +};

...

> +/*
> + * (1) This register must have same setting as VIOVAL if S_IO LDO is used to
> + *     power daisy chained IOs in the receive side.
> + * (2) If there is no I2C daisy chain it can be set freely.

> + *

Redundant empty line.

> + */

...

> +       struct tps68470_regulator_platform_data *pdata = pdev->dev.platform_data;

dev_get_platdata() ?

...

> +       data->clk = devm_clk_get(&pdev->dev, "tps68470-clk");
> +       if (IS_ERR(data->clk)) {
> +               dev_err(&pdev->dev, "Error getting tps68470-clk\n");
> +               return PTR_ERR(data->clk);
> +       }

return dev_err_probe(...);

...

> +               rdev = devm_regulator_register(&pdev->dev, &regulators[i], &config);
> +               if (IS_ERR(rdev)) {
> +                       dev_err(&pdev->dev, "failed to register %s regulator\n",
> +                               regulators[i].name);
> +                       return PTR_ERR(rdev);
> +               }

Ditto.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux