Re: [RFC PATCH 0/3] Re: i2c: core: introduce atomic transfers

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

 



Hi Stefan,

On 2019-04-15 23:34, Stefan Lengfeld wrote:
> Hi Wolfram,
> 
> the following RFC patches are based on your branch
> 
>> git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/i2c/atomic_xfer
> 
> I have used them to test your changes and my usecase on my available
> hardware setup: an i.MX6 Solo (phyCORE-i.MX6).
> 
> In general: Great stuff! And I vote for inclusion :-)
> 
> Even so this series does not tackle all problems at once, it's a step
> into the right direction to support reboot handlers using an external
> PMIC via I2C.

We have the same problem on our Colibri iMX7 board. Wolfram's patches
made it already upstream, I applied your patches successfully on 5.4-rc1
and rebooting via I2C seems to work fine now! Hence we would like to see
master_xfer_atomic support for the i.MX I2C driver too.

Are you continuing working on this patch set?

--
Stefan

> 
> Some additional comments below and also in-line in your posted patches.
> 
> 
>> a) we decided to respect the current locking scheme and to not give atomic
>> transfers a priority. The code needed for that would have been either
>> incomplete or very invasive. And we cannot guarantee successful transfers
>> anyhow. See [1] for the discussion and other write-ups for design choices.
> 
> Ack. I can just confirm that the mentioned locking issues are a real. I
> could not reproduce them on my single core ARM SoC, but on a multi core
> ARM system, e.g. the CPU frequency scaler is maybe holding the I2C
> transfer mutex, while the system is going to restart.
> 
> Just for reference: I 'solved' this by augmenting, read 'hacked', the
> locking schema, so a single device driver can block the whole I2C bus
> for itself and cause all other transfers to fail at once. See
> 
> https://www.spinics.net/lists/linux-i2c/msg25399.html
> 
> A real and good solution, as you said, is very invasive and must be
> thought out carefully.
> 
> 
> The appended patches are not meant for inclusion or review. They are
> just for reference of my testing setup.
> 
> Kind regards,
> Stefan Lengfeld
>   
> 
> Stefan Christ (1):
>   ARM: dts: phyboard-mira-dl: rely on PMIC for reboot and watchdog
> 
> Stefan Lengfeld (2):
>   watchdog: da9062: avoid regmap in restart handler
>   i2c: imx: implement master_xfer_atomic callback
> 
>  .../boot/dts/imx6dl-phytec-mira-rdk-nand.dts  |   8 ++
>  drivers/i2c/busses/i2c-imx.c                  | 128 +++++++++++++-----
>  drivers/mfd/da9062-core.c                     |   1 +
>  drivers/watchdog/da9062_wdt.c                 |  17 ++-
>  include/linux/mfd/da9062/core.h               |   1 +
>  5 files changed, 116 insertions(+), 39 deletions(-)



[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