Re: [PATCH v4 2/5] drivers: regulator: Add ADI MAX77541/MAX77540 Regulator Support

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

 



On Wed, Feb 01, 2023 at 01:35:15PM +0300, Okan Sahin wrote:
> Regulator driver for both MAX77541 and MAX77540.
> The MAX77541 is a high-efficiency step-down converter
> with two 3A switching phases for single-cell Li+ battery
> and 5VDC systems.
> 
> The MAX77540 is a high-efficiency step-down converter
> with two 3A switching phases.

...

With

> +	struct device *dev = &pdev->dev;

to be here the following can be shortened

> +	struct max77541 *max77541 = dev_get_drvdata(pdev->dev.parent);

	struct max77541 *max77541 = dev_get_drvdata(dev->parent);

> +	struct regulator_config config = {};
> +	const struct regulator_desc *desc;
> +	struct device *dev = &pdev->dev;
> +	struct regulator_dev *rdev;
> +	int i;

> +	config.dev = pdev->dev.parent;

	config.dev = dev->parent;

...

> +static const struct platform_device_id max77541_regulator_platform_id[] = {
> +	{ "max77540-regulator", },
> +	{ "max77541-regulator", },

Inner commas are not required.

> +	{  /* sentinel */  }
> +};

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux