All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Scally <djrscally@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org, heikki.krogerus@linux.intel.com,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	kitakar@gmail.com, jorhand@linux.microsoft.com,
	andriy.shevchenko@linux.intel.com
Subject: Re: cio2 ipu3 module to automatically connect sensors via swnodes
Date: Tue, 8 Sep 2020 10:40:09 +0100	[thread overview]
Message-ID: <5614b37e-c263-c9e7-fe5b-a523401c58e2@gmail.com> (raw)
In-Reply-To: <20200908080326.GB27352@paasikivi.fi.intel.com>

Hi Sakari - thanks for the reply

On 08/09/2020 09:03, Sakari Ailus wrote:
> On ACPI systems regulators and clocks as well as GPIOs to some extent are
> controlled by AML code in the DSDT and SSDT. There are different ways this
> can be implemented though. It may be that the PMIC in this case is
> controlled entirely from the AML code without the need for a driver.
>
> This might be the case here. It should be possible to figure this out from
> the DSDT and SSDT tables.

Ah - that's interesting, thanks. I'll delve into the SSDT and DSDT 
tables and see if I can spot that happening. Presumably it is the case 
though, as like I say it seems to be working fine without any 
intervention by our sensor drivers.

> If you do not change how the regulators in the PMIC are controlled I'd
> think it's very, very unlikely you'd be able to fry the sensors.
Very reassuring!
> The GPIOs there I'd expect to be reset GPIOs, one for each sensor.
> Interesting that they are not handled by ACPI in this case. FWIW, the
> tps68470 driver is present also in the upstream kernel.
Yeah we found the tps68470 gpio driver (actually andriy pointed it out I 
think) - it seems that the pins _provided_ by that driver don't actually 
have any affect when toggled though, only the ones allocated to the PMIC 
in its _CRM seem to turn the sensors on/off when toggled (at least, 
switching those off is the only thing that stops the sensor from 
appearing in i2cdetect). The pins from the PMIC's _CRM seem to just be 
system GPIO pins, controllable with `gpioset gpiochip0` for example. For 
the most part we've been controlling them in the sensor drivers by 
evaluating the sensor's _DEP entry in ACPI to get to the PMIC's 
acpi_device. That does seem a little hackish though, and it's definitely 
pretty ugly.

  reply	other threads:[~2020-09-08  9:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-05  8:19 cio2 ipu3 module to automatically connect sensors via swnodes Daniel Scally
2020-09-07  9:44 ` Andy Shevchenko
2020-09-07 10:49   ` Kieran Bingham
2020-09-07 11:45     ` Dan Scally
2020-09-08  8:03 ` Sakari Ailus
2020-09-08  9:40   ` Dan Scally [this message]
2020-09-08 13:56     ` Andy Shevchenko
2020-09-09  9:29     ` Sakari Ailus
2020-09-09 13:40 ` Heikki Krogerus
2020-09-09 14:33   ` Dan Scally
2020-09-12  7:45   ` Dan Scally
2020-09-14 14:58     ` Andy Shevchenko
2020-09-14 15:08       ` Dan Scally

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=5614b37e-c263-c9e7-fe5b-a523401c58e2@gmail.com \
    --to=djrscally@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jorhand@linux.microsoft.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=kitakar@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /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.