All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "gnurou@gmail.com" <gnurou@gmail.com>,
	"Lu, Aaron" <aaron.lu@intel.com>,
	"Nikula, Jani" <jani.nikula@intel.com>,
	"Kumar, Shobhit" <shobhit.kumar@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"lejun.zhu@linux.intel.com" <lejun.zhu@linux.intel.com>,
	"Vetter, Daniel" <daniel.vetter@intel.com>
Subject: Re: [PATCH 1/2] gpio/crystalcove: Export Panel and backlight en/disable signals as GPIO
Date: Wed, 18 Mar 2015 14:27:08 +0100	[thread overview]
Message-ID: <20150318132708.GL31422@phenom.ffwll.local> (raw)
In-Reply-To: <CACRpkdY2_hWHGrEW31DzOoL=hocWRn+9PPPj1AERur--eRRHtA@mail.gmail.com>

On Wed, Mar 18, 2015 at 12:50:51PM +0100, Linus Walleij wrote:
> On Thu, Mar 12, 2015 at 4:06 PM, Kumar, Shobhit <shobhit.kumar@intel.com> wrote:
> > On Mon, 2015-03-09 at 18:15 +0100, Linus Walleij wrote:
> >> On Fri, Mar 6, 2015 at 5:23 PM, Kumar, Shobhit <shobhit.kumar@intel.com> wrote:
> >>
> >> > There are actually two lines for Panel Power control and Backlight
> >> > enable/disable. I have already moved towards adding a new Cell device
> >> > for PWM child device and a new pwm driver for the same. That will take
> >> > care of backlight thingy. But for the Panel power control, I am at loss
> >> > for how best to program that.
> >>
> >> Isn't it just a very simple regulator (just on/off of fixed voltage) cell?
> >>
> >
> > It is just behaving as an output GPIO line and for that reason I feel
> > that rather than adding a new regulator driver,
> 
> I disagree. GPIO reads "general purpose input/output".
> 
> This is not a GPIO, this is a special purpose thing and IMO
> it should be modeled directly as a regulator.

The idea behind reusing gpio was that we can reuse the dynamic lookup
stuff so that i915 can find the gpio. And it is a gpio (there's lots more
on that chip), it's just that intel tends to hand you recommended board
layouts. And there's different ones so only really i915.ko can tell you if
it's indeed used to control the panel or not (after consulting a bunch of
vbios tables).

Regulator seems way too overkill for this, especially since it tends to be
a lie on systems where the panel is not connected to that gpio line. And
afaiui the point of the regulator subsystem is that you just ask for the
regulator for your IP block and then magically get handed the right bit
(or a dummy one). This is very much not the case, hw descriptions on x86
in this area are a kludge worse than board tables since we can't even fix
up what the bios hands us anywhere.

So for me plan B is to just handroll our own thing using the component
framework when reusing gpios isn't acceptable.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-03-18 13:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 12:18 [PATCH 0/2] Crystal Cove PMIC based Panel Control Shobhit Kumar
2015-02-18 12:18 ` [PATCH 1/2] gpio/crystalcove: Export Panel and backlight en/disable signals as GPIO Shobhit Kumar
2015-03-06 11:04   ` Linus Walleij
2015-03-06 16:23     ` Kumar, Shobhit
2015-03-09 17:15       ` Linus Walleij
2015-03-12 15:06         ` Kumar, Shobhit
2015-03-18 11:50           ` Linus Walleij
2015-03-18 13:27             ` Daniel Vetter [this message]
2015-03-24  9:50               ` Linus Walleij
2015-03-25 12:27   ` Linus Walleij
2015-03-25 14:15     ` Kumar, Shobhit
2015-03-25 14:39       ` Linus Walleij
2015-02-18 12:18 ` [PATCH 2/2] drm/i915: Use the CRC gpio_chip for panel enable/disable Shobhit Kumar
2015-02-26 10:13   ` Alexandre Courbot
2015-03-01 13:24     ` Kumar, Shobhit

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=20150318132708.GL31422@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=aaron.lu@intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=gnurou@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=lejun.zhu@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=shobhit.kumar@intel.com \
    --cc=thierry.reding@gmail.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.