linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] i2c: bcm2835: Fixes for clock changes in probe function
@ 2019-06-21 10:52 Annaliese McDermond
  2019-06-21 10:52 ` [PATCH v2 1/2] i2c: bcm2835: Move IRQ request after clock code in probe Annaliese McDermond
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Annaliese McDermond @ 2019-06-21 10:52 UTC (permalink / raw)
  To: eric, wahrenst, f.fainelli, wsa, swarren, linux-i2c,
	linux-rpi-kernel, linux-arm-kernel
  Cc: team, Annaliese McDermond

An issue was reported in [1] and [2] that the latest version of the i2c
driver was not properly loading.  After analysis it was determined that
the new clock code was failiing because the i2c driver was trying to
load before the bcm2835-clk driver when not loaded as a module. This is
fixed by actually attempting to grab a reference to the clock and failing
out with a EPROBE_DEFER if it's not there.  This gives the other drivers
an opportunity to load.

This series also fixes a related bug where the clock setup code in the
probe function could cause an issue where the IRQ would be requested
by the driver and never freed in case of some clock setup failure.  The
patch moves this IRQ code to the end of the probe function where it will
not cause this issue.

[1] - https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=242856
[2] - https://archlinuxarm.org/forum/viewtopic.php?f=23&t=13719

Annaliese McDermond (2):
  i2c: bcm2835: Move IRQ request after clock code in probe
  i2c: bcm2835: Ensure clock exists when probing

 drivers/i2c/busses/i2c-bcm2835.c | 42 +++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 17 deletions(-)

-- 
2.19.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-06-26 13:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-21 10:52 [PATCH v2 0/2] i2c: bcm2835: Fixes for clock changes in probe function Annaliese McDermond
2019-06-21 10:52 ` [PATCH v2 1/2] i2c: bcm2835: Move IRQ request after clock code in probe Annaliese McDermond
2019-06-26 13:16   ` Wolfram Sang
2019-06-21 10:52 ` [PATCH v2 2/2] i2c: bcm2835: Ensure clock exists when probing Annaliese McDermond
2019-06-26 13:16   ` Wolfram Sang
2019-06-21 17:11 ` [PATCH v2 0/2] i2c: bcm2835: Fixes for clock changes in probe function Stefan Wahren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).