lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <loom.20100127T192218-294@post.gmane.org>
Date:	Wed, 27 Jan 2010 18:28:30 +0000 (UTC)
From:	Russ Dill <Russ.Dill@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Re: How to write driver that needs to call another driver?

Stanislav Brabec <utx <at> penguin.cz> writes:

>
> My Zaurus SL-C3200 PDA needs a driver that needs to call another driver
> from another part of the device tree:
>
> MAX1111 (4 channel A/D) is connected to several other pieces of hardware
> (audio player remote keyboard, battery voltage, battery temperature,
> external power voltage).
>
> Battery power and charging management needs to read values from MAX1111
> during. Also Remote Keyboard input device needs to read MAX1111.
>
> But both drivers also need dedicated GPIO that are allocated on Scoop
> chip (different part of the platform device tree).
>

GPIO already has a generic API that can be used. I've had similar problems with
I2C devices. I've always implemented as adding in .command support to the I2C
driver in question, using i2c_use_client and then try_module_get. I'm not sure
if it is the proper way of doing things, it's always bugged me that there
doesn't seem to programatically access things like I2C eeproms and HW monitoring
devices. They seem to only be exposed though sysfs.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ