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@xxxxxxxxx> 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@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx