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]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux