Re: [PATCH v5 1/2] gpio: add GPO driver for PCA9570

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

 



On Tue, Jul 7, 2020 at 5:03 PM Sungbo Eo <mans0n@xxxxxxxxxx> wrote:
> On 20. 7. 6. 오후 9:00, Andy Shevchenko wrote:

...

> But I don't really understand what mutex does here. The driver does not
> need consecutive commands, it only sends/receives only one byte at a
> time. And AFAIK each i2c_smbus function is already protected by a mutex.
> So what should be exactly inside the lock? Should we protect the output
> buffer as well? I'm not an expert on this so please enlighten me.

There are questions, answering them will give you a solution:
- Since we have two functions doing i2c communications, can they
clash? If so, does the i2c framework guarantee the serialisation?
- Since we have a shared resource (buf), can accessors clash? How do
we guarantee serialization?

-- 
With Best Regards,
Andy Shevchenko




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux