All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] arm: omap2: Export devconf1 bypass and acbias.
Date: Mon, 11 Nov 2013 23:31:52 +0000	[thread overview]
Message-ID: <20131111233152.GR15154@atomide.com> (raw)
In-Reply-To: <CAAfyv37LRb_Q=UZVgtKdOAz_r6_qThewAU90W7nrqHdB5fDA_g@mail.gmail.com>

* Belisko Marek <marek.belisko@gmail.com> [131111 14:01]:
> Hi Tony,
> 
> On Mon, Nov 11, 2013 at 5:49 PM, Tony Lindgren <tony@atomide.com> wrote:
> > * Marek Belisko <marek@goldelico.com> [131014 14:11]:
> >> devconf1 reg access is localized only in mach-omap2 and we need to export
> >> updating of devconf1 from omapdss venc driver (bypass and acbias bits).
> >> Add simple api call which update only necessary bits.
> > ...
> >
> >> +void update_bypass_acbias(bool bypass, bool acbias)
> >> +{
> >> +#ifdef CONFIG_ARCH_OMAP3
> >> +     int val = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
> >> +
> >> +     if (bypass)
> >> +             val |= OMAP2_TVOUTBYPASS;
> >> +     else
> >> +             val &= ~OMAP2_TVOUTBYPASS;
> >> +
> >> +     if (acbias)
> >> +             val |= OMAP2_TVACEN;
> >> +     else
> >> +             val &= ~OMAP2_TVACEN;
> >> +
> >> +     omap_ctrl_writel(val, OMAP343X_CONTROL_DEVCONF1);
> >> +#endif
> >
> > If this is truly a pinmux, you could already access this
> > using pinctrl-single,bits device tree driver.
> >
> > But I guess that won't work yet, so it's best to set this
> > up as a separate driver like we've done for the USB PHY
> > registers.
>
> Can you please point me to that driver directly? I cannot see benefit
> of new driver as as it will be only dummy driver
> with export_symbol_gpl of upper function. Can it sit then in dss
> directory or somewhere else? Thanks.

You can take a look at drivers/usb/phy/phy-omap-control.c.

Then there's a device tree using example for control_devconf0 in
Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt.

Looks like CONTROL_DEVCONF1 contains a bunch of misc registers,
and arch/arm/mach-omap2/hsmmc.c seems to be tinkering with it too.

It would be best to set it up as omap-ctrl.c driver under drivers
somewhere with few functions exported for DSS and MMC drivers.

The reason why it should be a separate driver is that the system
control module can live a separate runtime PM life from the
drivers using the CONTROL_DEVCONF register bits.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Belisko Marek <marek.belisko@gmail.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-fbdev@vger.kernel.org, NeilBrown <neilb@suse.de>,
	"Dr. H. Nikolaus Schaller" <hns@goldelico.com>
Subject: Re: [PATCH 1/3] arm: omap2: Export devconf1 bypass and acbias.
Date: Mon, 11 Nov 2013 15:31:52 -0800	[thread overview]
Message-ID: <20131111233152.GR15154@atomide.com> (raw)
In-Reply-To: <CAAfyv37LRb_Q=UZVgtKdOAz_r6_qThewAU90W7nrqHdB5fDA_g@mail.gmail.com>

* Belisko Marek <marek.belisko@gmail.com> [131111 14:01]:
> Hi Tony,
> 
> On Mon, Nov 11, 2013 at 5:49 PM, Tony Lindgren <tony@atomide.com> wrote:
> > * Marek Belisko <marek@goldelico.com> [131014 14:11]:
> >> devconf1 reg access is localized only in mach-omap2 and we need to export
> >> updating of devconf1 from omapdss venc driver (bypass and acbias bits).
> >> Add simple api call which update only necessary bits.
> > ...
> >
> >> +void update_bypass_acbias(bool bypass, bool acbias)
> >> +{
> >> +#ifdef CONFIG_ARCH_OMAP3
> >> +     int val = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
> >> +
> >> +     if (bypass)
> >> +             val |= OMAP2_TVOUTBYPASS;
> >> +     else
> >> +             val &= ~OMAP2_TVOUTBYPASS;
> >> +
> >> +     if (acbias)
> >> +             val |= OMAP2_TVACEN;
> >> +     else
> >> +             val &= ~OMAP2_TVACEN;
> >> +
> >> +     omap_ctrl_writel(val, OMAP343X_CONTROL_DEVCONF1);
> >> +#endif
> >
> > If this is truly a pinmux, you could already access this
> > using pinctrl-single,bits device tree driver.
> >
> > But I guess that won't work yet, so it's best to set this
> > up as a separate driver like we've done for the USB PHY
> > registers.
>
> Can you please point me to that driver directly? I cannot see benefit
> of new driver as as it will be only dummy driver
> with export_symbol_gpl of upper function. Can it sit then in dss
> directory or somewhere else? Thanks.

You can take a look at drivers/usb/phy/phy-omap-control.c.

Then there's a device tree using example for control_devconf0 in
Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt.

Looks like CONTROL_DEVCONF1 contains a bunch of misc registers,
and arch/arm/mach-omap2/hsmmc.c seems to be tinkering with it too.

It would be best to set it up as omap-ctrl.c driver under drivers
somewhere with few functions exported for DSS and MMC drivers.

The reason why it should be a separate driver is that the system
control module can live a separate runtime PM life from the
drivers using the CONTROL_DEVCONF register bits.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] arm: omap2: Export devconf1 bypass and acbias.
Date: Mon, 11 Nov 2013 15:31:52 -0800	[thread overview]
Message-ID: <20131111233152.GR15154@atomide.com> (raw)
In-Reply-To: <CAAfyv37LRb_Q=UZVgtKdOAz_r6_qThewAU90W7nrqHdB5fDA_g@mail.gmail.com>

* Belisko Marek <marek.belisko@gmail.com> [131111 14:01]:
> Hi Tony,
> 
> On Mon, Nov 11, 2013 at 5:49 PM, Tony Lindgren <tony@atomide.com> wrote:
> > * Marek Belisko <marek@goldelico.com> [131014 14:11]:
> >> devconf1 reg access is localized only in mach-omap2 and we need to export
> >> updating of devconf1 from omapdss venc driver (bypass and acbias bits).
> >> Add simple api call which update only necessary bits.
> > ...
> >
> >> +void update_bypass_acbias(bool bypass, bool acbias)
> >> +{
> >> +#ifdef CONFIG_ARCH_OMAP3
> >> +     int val = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
> >> +
> >> +     if (bypass)
> >> +             val |= OMAP2_TVOUTBYPASS;
> >> +     else
> >> +             val &= ~OMAP2_TVOUTBYPASS;
> >> +
> >> +     if (acbias)
> >> +             val |= OMAP2_TVACEN;
> >> +     else
> >> +             val &= ~OMAP2_TVACEN;
> >> +
> >> +     omap_ctrl_writel(val, OMAP343X_CONTROL_DEVCONF1);
> >> +#endif
> >
> > If this is truly a pinmux, you could already access this
> > using pinctrl-single,bits device tree driver.
> >
> > But I guess that won't work yet, so it's best to set this
> > up as a separate driver like we've done for the USB PHY
> > registers.
>
> Can you please point me to that driver directly? I cannot see benefit
> of new driver as as it will be only dummy driver
> with export_symbol_gpl of upper function. Can it sit then in dss
> directory or somewhere else? Thanks.

You can take a look at drivers/usb/phy/phy-omap-control.c.

Then there's a device tree using example for control_devconf0 in
Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt.

Looks like CONTROL_DEVCONF1 contains a bunch of misc registers,
and arch/arm/mach-omap2/hsmmc.c seems to be tinkering with it too.

It would be best to set it up as omap-ctrl.c driver under drivers
somewhere with few functions exported for DSS and MMC drivers.

The reason why it should be a separate driver is that the system
control module can live a separate runtime PM life from the
drivers using the CONTROL_DEVCONF register bits.

Regards,

Tony

  reply	other threads:[~2013-11-11 23:31 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-14 21:02 [PATCH 0/3] omapdss: venc: Add support for bypass and acbias Marek Belisko
2013-10-14 21:02 ` Marek Belisko
2013-10-14 21:02 ` Marek Belisko
2013-10-14 21:02 ` [PATCH 1/3] arm: omap2: Export devconf1 " Marek Belisko
2013-10-14 21:02   ` Marek Belisko
2013-10-14 21:02   ` Marek Belisko
2013-11-11 16:49   ` Tony Lindgren
2013-11-11 16:49     ` Tony Lindgren
2013-11-11 16:49     ` Tony Lindgren
2013-11-11 22:00     ` Belisko Marek
2013-11-11 22:00       ` Belisko Marek
2013-11-11 22:00       ` Belisko Marek
2013-11-11 23:31       ` Tony Lindgren [this message]
2013-11-11 23:31         ` Tony Lindgren
2013-11-11 23:31         ` Tony Lindgren
2013-12-10 22:11         ` Belisko Marek
2013-12-10 22:11           ` Belisko Marek
2013-12-10 22:11           ` Belisko Marek
2013-12-10 22:46           ` Tony Lindgren
2013-12-10 22:46             ` Tony Lindgren
2013-12-10 22:46             ` Tony Lindgren
2013-12-10 22:46             ` Tony Lindgren
2013-12-12  8:31             ` Belisko Marek
2013-12-12  8:31               ` Belisko Marek
2013-12-12  8:31               ` Belisko Marek
2013-12-12 19:19               ` Tony Lindgren
2013-12-12 19:19                 ` Tony Lindgren
2013-12-12 19:19                 ` Tony Lindgren
2013-12-12 19:19                 ` Tony Lindgren
2013-11-11 22:20     ` Belisko Marek
2013-11-11 22:20       ` Belisko Marek
2013-11-11 22:20       ` Belisko Marek
2013-11-11 23:34       ` Tony Lindgren
2013-11-11 23:34         ` Tony Lindgren
2013-11-11 23:34         ` Tony Lindgren
2013-11-11 23:34         ` Tony Lindgren
2013-10-14 21:02 ` [PATCH 2/3] video: venc: Add new callback and handling for bypass and acbias setup Marek Belisko
2013-10-14 21:02   ` Marek Belisko
2013-10-14 21:02   ` Marek Belisko
2013-10-14 21:02 ` [PATCH 3/3] omapdss: Add OPA362 analog video amplifier driver Marek Belisko
2013-10-14 21:02   ` Marek Belisko
2013-10-14 21:02   ` Marek Belisko
2013-11-05  7:24 ` [PATCH 0/3] omapdss: venc: Add support for bypass and acbias Belisko Marek
2013-11-05  7:24   ` Belisko Marek
2013-11-05  7:24   ` Belisko Marek
2013-11-11 13:29   ` Tomi Valkeinen
2013-11-11 13:29     ` Tomi Valkeinen
2013-11-11 13:29     ` Tomi Valkeinen
2013-11-11 13:29     ` Tomi Valkeinen
2013-11-11 13:57     ` Dr. H. Nikolaus Schaller
2013-11-11 13:57       ` Dr. H. Nikolaus Schaller
2013-11-11 13:57       ` Dr. H. Nikolaus Schaller
2013-11-11 13:57       ` Dr. H. Nikolaus Schaller
2013-11-11 14:13       ` Tomi Valkeinen
2013-11-11 14:13         ` Tomi Valkeinen
2013-11-11 14:13         ` Tomi Valkeinen
2013-11-11 14:13         ` Tomi Valkeinen
2013-11-11 14:30         ` Dr. H. Nikolaus Schaller
2013-11-11 14:30           ` Dr. H. Nikolaus Schaller
2013-11-11 14:30           ` Dr. H. Nikolaus Schaller
2013-11-11 14:30           ` Dr. H. Nikolaus Schaller
2013-11-11 16:54           ` Tony Lindgren
2013-11-11 16:54             ` Tony Lindgren
2013-11-11 16:54             ` Tony Lindgren
2013-11-11 16:54             ` Tony Lindgren
2013-11-18 13:29           ` Tomi Valkeinen
2013-11-18 13:29             ` Tomi Valkeinen
2013-11-18 13:29             ` Tomi Valkeinen
2013-11-18 13:29             ` Tomi Valkeinen
2013-11-18 14:00             ` Dr. H. Nikolaus Schaller
2013-11-18 14:00               ` Dr. H. Nikolaus Schaller
2013-11-18 14:00               ` Dr. H. Nikolaus Schaller
2013-11-18 14:00               ` Dr. H. Nikolaus Schaller
2013-11-11 14:39         ` Dr. H. Nikolaus Schaller
2013-11-11 14:39           ` Dr. H. Nikolaus Schaller
2013-11-11 14:39           ` Dr. H. Nikolaus Schaller
2013-11-11 14:39           ` Dr. H. Nikolaus Schaller

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=20131111233152.GR15154@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.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.