LDD3 vs Essential Linux Device Drivers

2020-04-30 Thread Mohamed Dawod
Hi, I would like to start learning about Linux kernel and device drivers development. Should I have to start with LDD3 as a lot of people advice ? or can I start with the Essential Linux Device Drivers by Sreekrishnan Venkateswaran. I know that the second book may be more advanced but I feel that

Re: how to perform i2c transaction with disabled irq?

2020-04-30 Thread Tomek The Messenger
They are afraid that some peripheral device will report interrupt and after board reset the peripheral device will be in some transient state if handling of interrupt from peripheral device will be somewhere in the middle interrupted by board reset. However in this case this is probably uboot task

Call flush_scheduled_work in the context of a work routine

2020-04-30 Thread Bogdan Bogush
The comment to flush_scheduled_work states that calling this function in the context of a work routine will lead to deadlock. I think it means following scenario: static void handler(struct work_struct *work) { flush_scheduled_work(); } static DECLARE_WORK(work, handler); schedule_work();

Re: how to perform i2c transaction with disabled irq?

2020-04-30 Thread Greg KH
On Thu, Apr 30, 2020 at 01:11:06PM +0200, Tomek The Messenger wrote: > Hi > If I don't have disabled irqs I can use API i2c_smbus_write_byte in order > to perform i2c transaction. > But how to make i2c transaction if I have disabled irq? Is any built-in > function which lets such operation, where

how to perform i2c transaction with disabled irq?

2020-04-30 Thread Tomek The Messenger
Hi If I don't have disabled irqs I can use API i2c_smbus_write_byte in order to perform i2c transaction. But how to make i2c transaction if I have disabled irq? Is any built-in function which lets such operation, where there is some polling implemented? The background is that I do i2c transaction