Re: [PATCH v2] i2c: designware: add a new bit check for IC_CON control

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

 



On Wed, Jan 18, 2023 at 07:27:06PM +0530, Shyam Sundar S K wrote:
> On 1/17/2023 8:38 PM, Andy Shevchenko wrote:
> > On Tue, Jan 17, 2023 at 05:58:01PM +0530, Shyam Sundar S K wrote:

...

> >> +	ic_con = ioread32(dev->base + DW_IC_CON);
> > 
> > Any particular reason why regmap_read() can't be used?
> 
> Yes. init_regmap() happens at a later stage in dw_i2c_plat_probe() and
> i2c_dw_configure() gets called first.
> 
> So dev->map will not be initialized to use regmap_read().
> 
> In order to use regmap_read() instead of ioread32() in this case, we
> have to defer calling i2c_dw_configure()

I think we need to try to be consistent with IO accessors across the driver
which means to try hard to have regmap being initialised beforehand or other
functions being moved accordingly. However, it seems a bit non-trivial
ordering case and I leave this to you, I²C maintainers and this driver
maintainer to decide how to proceed.

-- 
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