Re: [PATCH 6/6] RTC: Trivially probe for an M41T80 (#2)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Brownell
Date: Thursday, May 22, 2008 - 8:07 pm

On Tuesday 13 May 2008, Maciej W. Rozycki wrote:

One idiom to consider is callbacks (or notifications) when the
relevant i2c_adapter is registered.

Some of the GPIO drivers do that, so that they can hook up the
relevant devices or options.  Example, when an pcf8574 expander
is used to drive LEDs, the "this chip got registered" callback
can register the relevant "leds-gpio" platform device.  Or when
it's used to switch power to other devices, sometimes they must
defer registration till then too (power them up first, *then* it
makes sense to register them).

This could handle that "board has this I2C RTC -or- that one"
case pretty cleanly; but then, so would having a "probe first"
flag that's specific to the i2c_board_info.  (So long as the
probe logic could distinguish the devices... which will not in
the most general case work from i2c-core code.)

- Dave
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 6/6] RTC: Trivially probe for an M41T80 (#2), Maciej W. Rozycki, (Mon May 12, 8:27 pm)
Re: [PATCH 6/6] RTC: Trivially probe for an M41T80 (#2), Jean Delvare, (Tue May 13, 5:28 am)
Re: [PATCH 6/6] RTC: Trivially probe for an M41T80 (#2), Maciej W. Rozycki, (Tue May 13, 6:13 pm)
Re: [PATCH 6/6] RTC: Trivially probe for an M41T80 (#2), Jean Delvare, (Mon May 19, 1:37 pm)
Re: [PATCH 6/6] RTC: Trivially probe for an M41T80 (#2), David Brownell, (Thu May 22, 8:07 pm)