Re: [PATCH 2/2] regulator: rt5739: Add DID check and compatible for rt5733

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

 



On Wed, Jun 28, 2023 at 04:47:17PM +0800, cy_huang@xxxxxxxxxxx wrote:

> +	if (did == RT5733_CHIPDIE_ID) {
> +		min_uV = RT5733_VOLT_MINUV;
> +		max_uV = RT5733_VOLT_MAXUV;
> +		step_uV = RT5733_VOLT_STPUV;
> +	} else {
> +		min_uV = RT5739_VOLT_MINUV;
> +		max_uV = RT5739_VOLT_MAXUV;
> +		step_uV = RT5739_VOLT_STPUV;
> +	}

It would be better to write these as switch statements so if any more
variants turn up they can be added more easily.

Attachment: signature.asc
Description: PGP signature


[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