Re: [PATCH v4 8/9] i2c: npcm: Remove own slave addresses 2:10

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

 



On Tue, May 10, 2022 at 05:16:53PM +0800, Tyrone Ting wrote:
> From: Tali Perry <tali.perry1@xxxxxxxxx>
> 
> NPCM can support up to 10 own slave addresses.
> In practice, only one address is actually being used.
> In order to access addresses 2 and above, need to switch
> register banks. The switch needs spinlock.
> To avoid using spinlock for this useless feature
> removed support of SA >= 2.

> Also fix returned slave event enum.
> 
> Remove some comment since the bank selection is not
> required. The bank selection is not required since
> the supported slave addresses are reduced.

Fancy indentation. Please fix it in all your commit messages where it applies.

...

> +	if (addr_type > I2C_SLAVE_ADDR2 && addr_type <= I2C_SLAVE_ADDR10) {
> +		dev_err(bus->dev,
> +			"try to enable more then 2 SA not supported\n");

Make it one line and drop {}.

> +	}

...

> +	if (addr_type > I2C_SLAVE_ADDR2 && addr_type <= I2C_SLAVE_ADDR10) {
> +		dev_err(bus->dev,
> +			"get slave: try to use more then 2 slave addresses not supported\n");

As per above be consistent with abbreviations ("SA" here, which makes line
shorter) and follow the above recommendation.

> +	}

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux