All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] Using lm-sensors with TWL4030
Date: Wed, 04 May 2011 16:11:56 +0000	[thread overview]
Message-ID: <20110504161156.GB8443@ericsson.com> (raw)
In-Reply-To: <4DBFE717.1060000@je-suunnittelu.fi>

On Wed, May 04, 2011 at 04:18:01AM -0400, Jean Delvare wrote:
> 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.
> 
There was an exchange about that last night. Keerthy mentioned that he would submit a patch.

Guenter

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

      parent reply	other threads:[~2011-05-04 16:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 11:29 [lm-sensors] Using lm-sensors with TWL4030 Niclas Knuts
2011-05-03 11:42 ` Jean Delvare
2011-05-03 11:59 ` Niclas Knuts
2011-05-03 12:25 ` Jean Delvare
2011-05-04  7:08 ` Niclas Knuts
2011-05-04  8:18 ` Jean Delvare
2011-05-04  8:39 ` Niclas Knuts
2011-05-04  9:31 ` Niclas Knuts
2011-05-04  9:44 ` Niclas Knuts
2011-05-04 16:11 ` Guenter Roeck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110504161156.GB8443@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.