lkml.org 
[lkml]   [2006]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Where did find_bus() go in 2.6.18?
On Tue, Nov 21, 2006 at 12:29:15PM -0600, Matthew Frost (artusemrys@sbcglobal.net) wrote:
> So you have nested drivers. The bottom driver (w1/slaves/w1_ds2760.c) talks to
> the hardware, and the top driver (misc/h2200_battery.c) interprets the output.
> You're dealing with a Dallas 1-Wire Bus protocol to talk to your battery
> management chip, which is a DS2760 High-Precision Li+ Battery Monitor. You're
> telling us that h2200_battery uses find_bus() to locate the w1 bus and then the
> devices on that bus, so that it can use w1_ds2760 to read the chip. So what is
> hanging you up here is that your top-level driver can't find the bus that the
> chip is on; once it can, everything should work?
>
> The specific code:
>
> void
> h2200_battery_probe_work(void *data)
> {
> struct bus_type *bus;
>
> /* Get the battery w1 slave device. */
> bus = find_bus("w1");
> if (bus)
> ds2760_dev = bus_find_device(bus, NULL, NULL,
> h2200_battery_match_callback);
>
> if (!ds2760_dev) {
> /* No DS2760 device found; try again later. */
> queue_delayed_work(probe_q, &probe_work, HZ * 5);
> return;
> }
> }
>
> What we need to do is help you find a better way to locate and identify a w1 device.
>
> (cc: E. Polyakov for the w1 expertise)

Hello.

If find_bus() will not be resurrected, I can export w1_bus_type or
create special helpers to directly access w1 bus master devices.
But in that case there is no need to have all driver model in w1
subsystem at all...

> Matt

--
Evgeniy Polyakov
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-11-21 20:07    [W:0.101 / U:0.536 seconds]
©2003-2011 Jasper Spaans. Advertise on this site