Re: Using lm-sensors with TWL4030

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 04 May 2011 10:08:12 +0300, Niclas Knuts wrote:
> On 3.5.2011 15:25, Jean Delvare wrote:
> > On Tue, 03 May 2011 14:59:37 +0300, Niclas Knuts wrote:
> >> On 3.5.2011 14:42, Jean Delvare wrote:
> >>> On Tue, 03 May 2011 14:29:27 +0300, Niclas Knuts wrote:
> >>>> I am trying to setup lm-sensors for use with the Texas Instruments
> >>>> TWL4030 Chip (the main processor is  a OMAP3503). But I cannot seem to
> >>>> get it to detect the chip. I have added the hwmon drivers and I am using
> >>>> up to date MADC drivers that I have backported to kernel 2.6.32 (I am
> >>>> running Angstrom).
> >>> Disclaimer: I don't know a thing about this chip nor its drivers.
> >>>
> >>> There is no detection support for this device in sensors-detect, if
> >>> this was your question. I don't think this device can be detected from
> >>> user-space.
> >> I am aware that the automatic detect doesn't work, I have read through
> >> the sensors-detect script.
> >>> My understanding is that the drivers for the TWL4030 should all get
> >>> loaded automatically thanks to module aliases, as long as the TWL4030
> >>> itself is properly registered during platform setup. Check in lsmod
> >>> whether twl4030-madc and twl4030-madc-hwmon are actually loaded. If
> >>> not, try loading them manually
> >> lsmod doesn't show the drivers, but they should have been compiled into
> >> the kernel, not as modules. Maybe
> >> that is the problem?
> > No, this shouldn't make a difference. Check under /sys/devices/platform
> > if the platform devices have been properly created
> Ok, they are missing from there. I guess there is some problem with 
> compiling in the drivers then.

Again, no. Modules or built-in should make no difference.

> Is it enough to compile them in or do I 
> initialize them in the board specific files in any way?

Please take a look at:
drivers/mfd/twl-core.c

As I understand it, the board code has to instantiate one of the I2C
devices listed in twl_ids. This will call twl_probe() which in turn
should instantiate all the relevant platform devices.
arch/arm/mach-omap2 contains many examples:

$ grep -rI '"twl4030"' arch/
arch/arm/mach-omap2/board-omap3stalker.c:	 I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-igep0020.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3evm.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-2430sdp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3beagle.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-3430sdp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-igep0030.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-ldp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3touchbook.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3logic.c:		I2C_BOARD_INFO("twl4030", 0x48),

That being said, I can't find any code to instantiate
twl4030_madc_hwmon, so it might as well be that this part is missing
from the upstream kernel. Cc'ing Keerthy and Axel Lin who probably know
what's going on.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux