Re: [PATCH 2/2] Input: goodix_berlin - Add support for Berlin-A series

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

 



Hi Jens,

On Mon, Feb 03, 2025 at 06:43:09PM +0100, Jens Reidel wrote:
>  
> -	error = regmap_raw_read(cd->regmap, GOODIX_BERLIN_FW_VERSION_INFO_ADDR,
> +	if (ic_data->ic_type == IC_TYPE_BERLIN_A)
> +		fw_version_info_addr = GOODIX_BERLIN_FW_VERSION_INFO_ADDR_A;
> +	else
> +		fw_version_info_addr = GOODIX_BERLIN_FW_VERSION_INFO_ADDR;
> +

Instead of branching on IC type please have goodix_berlin_ic_data
structure describe differences in the chips (by adding
fw_version_info_addr, ic_info_addr and other fields) and then simply use
them.

Thanks.

-- 
Dmitry




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux