* Re: [PATCH v2] video: simplefb: add mode parsing function
From: Stephen Warren @ 2013-06-02 5:07 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130601051223.GB5189@quad.lixom.net>
On 05/31/2013 11:12 PM, Olof Johansson wrote:
> On Mon, May 27, 2013 at 10:13:09PM -0600, Stephen Warren wrote:
>> On 05/26/2013 09:53 PM, Alexandre Courbot wrote:
>>> The naming scheme of simplefb's mode is precise enough to allow building
>>> the mode structure from it instead of using a static list of modes. This
>>> patch introduces a function that does this. In case exotic modes that
>>> cannot be represented from their name alone are needed, the static list
>>> of modes is still available as a backup.
...
>> As such, we should either:
>>
>> a) Just add new entries into the format array that already exists in the
>> driver. Given David's response, this might be simplest.
>
> I think so too. Is this even needed? Do we have any users of the newer formats
> or is it just someone trying to feature-creep this driver to make the "simple"
> part of the name inaccurate? :)
Alex is working on board support for a new NVIDIA board, where IIRC the
bootloader sets up some 32-bit ARGB format for the panel.
^ permalink raw reply
* Re: [PATCH v2] video: simplefb: add mode parsing function
From: Olof Johansson @ 2013-06-02 5:09 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <51AAD326.4040809@wwwdotorg.org>
On Sat, Jun 1, 2013 at 10:07 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 05/31/2013 11:12 PM, Olof Johansson wrote:
>> On Mon, May 27, 2013 at 10:13:09PM -0600, Stephen Warren wrote:
>>> On 05/26/2013 09:53 PM, Alexandre Courbot wrote:
>>>> The naming scheme of simplefb's mode is precise enough to allow building
>>>> the mode structure from it instead of using a static list of modes. This
>>>> patch introduces a function that does this. In case exotic modes that
>>>> cannot be represented from their name alone are needed, the static list
>>>> of modes is still available as a backup.
> ...
>>> As such, we should either:
>>>
>>> a) Just add new entries into the format array that already exists in the
>>> driver. Given David's response, this might be simplest.
>>
>> I think so too. Is this even needed? Do we have any users of the newer formats
>> or is it just someone trying to feature-creep this driver to make the "simple"
>> part of the name inaccurate? :)
>
> Alex is working on board support for a new NVIDIA board, where IIRC the
> bootloader sets up some 32-bit ARGB format for the panel.
Ah, ok. Let's just implement that one format too then. :)
-Olof
^ permalink raw reply
* Re: [PATCH] fbdev: bfin-lq035q1-fb: Use dev_pm_ops
From: Rafael J. Wysocki @ 2013-06-02 19:30 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Jean-Christophe PLAGNIOL-VILLARD',
'Lars-Peter Clausen', 'Michael Hennerich',
'Tomi Valkeinen', linux-fbdev, linux-pm
In-Reply-To: <000a01ce5daf$8b228b80$a167a280$@samsung.com>
On Friday, May 31, 2013 12:32:57 PM Jingoo Han wrote:
> On Thursday, May 30, 2013 7:46 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 09:52 Thu 30 May , Lars-Peter Clausen wrote:
> > > On 05/30/2013 09:14 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > On 09:32 Thu 30 May , Jingoo Han wrote:
> > > >> On Thursday, May 30, 2013 4:20 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > >>> On 16:24 Wed 29 May , Michael Hennerich wrote:
> > > >>>> On 05/29/2013 02:17 PM, Lars-Peter Clausen wrote:
> > > >>>>> Use dev_pm_ops instead of the legacy suspend/resume callbacks.
> > > >>>>>
> > > >>>>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> > > >>>> Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> > > >>>>> ---
> > > >>>>> drivers/video/bfin-lq035q1-fb.c | 22 ++++++++++++++--------
> > > >>>>> 1 file changed, 14 insertions(+), 8 deletions(-)
> > > >>>>>
> > > >>>>> diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c
> > > >>>>> index 29d8c04..6084c17 100644
> > > >>>>> --- a/drivers/video/bfin-lq035q1-fb.c
> > > >>>>> +++ b/drivers/video/bfin-lq035q1-fb.c
> > > >>>>> @@ -170,16 +170,19 @@ static int lq035q1_spidev_remove(struct spi_device *spi)
> > > >>>>> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > > >>>>> }
> > > >>>>> -#ifdef CONFIG_PM
> > > >>>>> -static int lq035q1_spidev_suspend(struct spi_device *spi, pm_message_t state)
> > > >>>>> +#ifdef CONFIG_PM_SLEEP
> > > >>>>> +static int lq035q1_spidev_suspend(struct device *dev)
> > > >>>>> {
> > > >>>>> + struct spi_device *spi = to_spi_device(dev);
> > > >>>>> +
> > > >>>>> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > > >>>>> }
> > > >>>>> -static int lq035q1_spidev_resume(struct spi_device *spi)
> > > >>>>> +static int lq035q1_spidev_resume(struct device *dev)
> > > >>>>> {
> > > >>>>> - int ret;
> > > >>>>> + struct spi_device *spi = to_spi_device(dev);
> > > >>>>> struct spi_control *ctl = spi_get_drvdata(spi);
> > > >>>>> + int ret;
> > > >>>>> ret = lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
> > > >>>>> if (ret)
> > > >>>>> @@ -187,9 +190,13 @@ static int lq035q1_spidev_resume(struct spi_device *spi)
> > > >>>>> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
> > > >>>>> }
> > > >>>>> +
> > > >>>>> +static SIMPLE_DEV_PM_OPS(lq035q1_spidev_pm_ops, lq035q1_spidev_suspend,
> > > >>>>> + lq035q1_spidev_resume);
> > > >>>>> +#define LQ035Q1_SPIDEV_PM_OPS (&lq035q1_spidev_pm_ops)
> > > >>>>> +
> > > >>>>> #else
> > > >>>>> -# define lq035q1_spidev_suspend NULL
> > > >>>>> -# define lq035q1_spidev_resume NULL
> > > >>>>> +#define LQ035Q1_SPIDEV_PM_OPS NULL
> > > >>>>> #endif
> > > >>> we really need to ahve a macro like for DT of_match_ptr to drop the #else
> > > >>
> > > >> Hi Jean-Christophe PLAGNIOL-VILLARD,
> > > >>
> > > >> I submitted the following patch. :)
> > > >> (https://patchwork.kernel.org/patch/2502971/)
> > > >>
> > > >> --- a/include/linux/pm.h
> > > >> +++ b/include/linux/pm.h
> > > >> @@ -55,8 +55,10 @@ struct device;
> > > >>
> > > >> #ifdef CONFIG_PM
> > > >> extern const char power_group_name[]; /* = "power" */
> > > >> +#define pm_ops_ptr(_ptr) (_ptr)
> > > >> #else
> > > >> #define power_group_name NULL
> > > >> +#define pm_ops_ptr(_ptr) NULL
> > > >> #endif
> > > >>
> > > >>
> > > >> This patch was accepted by Rafael Wysocki, and will be merged to v3.11-rc1.
> > > >>
> > > > Lars-Peter please update with and
> > >
> > > Since the code depends on CONFIG_PM_SLEEP and not CONFIG_PM I don't think
> > > the macro will work.
> >
> > se please ad a similar macros too
>
> Hi Jean-Christophe,
>
> I added pm_sleep_ops_ptr() as below.
> Maybe you want it.
> There is no build warnings below 4 config situations.
> a) CONFIG_PM is enabled.
> b) only CONFIG_PM_SLEEP is enabled
> c) only CONFIG_PM_RUNTIME is enabled
> d) CONFIG_PM is NOT enabled.
>
> --- a/drivers/video/bfin-lq035q1-fb.c
> +++ b/drivers/video/bfin-lq035q1-fb.c
> @@ -170,16 +170,19 @@ static int lq035q1_spidev_remove(struct spi_device *spi)
> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> }
>
> -#ifdef CONFIG_PM
> -static int lq035q1_spidev_suspend(struct spi_device *spi, pm_message_t state)
> +#ifdef CONFIG_PM_SLEEP
> +static int lq035q1_spidev_suspend(struct device *dev)
> {
> + struct spi_device *spi = to_spi_device(dev);
> +
> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> }
>
> -static int lq035q1_spidev_resume(struct spi_device *spi)
> +static int lq035q1_spidev_resume(struct device *dev)
> {
> - int ret;
> + struct spi_device *spi = to_spi_device(dev);
> struct spi_control *ctl = spi_get_drvdata(spi);
> + int ret;
>
> ret = lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
> if (ret)
> @@ -187,11 +190,11 @@ static int lq035q1_spidev_resume(struct spi_device *spi)
>
> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
> }
> -#else
> -# define lq035q1_spidev_suspend NULL
> -# define lq035q1_spidev_resume NULL
> #endif
>
> +static SIMPLE_DEV_PM_OPS(lq035q1_spidev_pm_ops, lq035q1_spidev_suspend,
> + lq035q1_spidev_resume);
> +
> /* Power down all displays on reboot, poweroff or halt */
> static void lq035q1_spidev_shutdown(struct spi_device *spi)
> {
> @@ -708,8 +711,7 @@ static int bfin_lq035q1_probe(struct platform_device *pdev)
> info->spidrv.probe = lq035q1_spidev_probe;
> info->spidrv.remove = lq035q1_spidev_remove;
> info->spidrv.shutdown = lq035q1_spidev_shutdown;
> - info->spidrv.suspend = lq035q1_spidev_suspend;
> - info->spidrv.resume = lq035q1_spidev_resume;
> + info->spidrv.driver.pm = pm_sleep_ops_ptr(&lq035q1_spidev_pm_ops);
>
> ret = spi_register_driver(&info->spidrv);
> if (ret < 0) {
> diff --git a/include/linux/pm.h b/include/linux/pm.h
> index bd50d15..999d652 100644
> --- a/include/linux/pm.h
> +++ b/include/linux/pm.h
> @@ -61,6 +61,12 @@ extern const char power_group_name[]; /* = "power" */
> #define pm_ops_ptr(_ptr) NULL
> #endif
>
> +#ifdef CONFIG_PM_SLEEP
> +#define pm_sleep_ops_ptr(_ptr) (_ptr)
> +#else
> +#define pm_sleep_ops_ptr(_ptr) NULL
> +#endif
> +
>
>
> Hi Rafael J. Wysocki,
> How about adding this pm_sleep_ops_ptr() macro?
Are you submitting this instead or in addition to your patch I have in the
linux-next branch?
Rafael
> My draft idea is below:
> However, I want other's better ideas. :)
>
> 1. The case that only CONFIG_PM_SLEEP is necessary.
> #ifdef CONFIG_PM_SLEEP
> static int *_suspend(struct device *dev)
> [....]
> static int *_resume(struct device *dev)
> [....]
> #endif
>
> static SIMPLE_DEV_PM_OPS(*_pm_ops, *_suspend, *_resume);
>
> static struct {platform/spi/i2c/etc}_driver *_driver = {
> .driver = {
> .pm = pm_sleep_ops_ptr(&*_pm_ops),
>
>
> 2. The case that both CONFIG_PM_SLEEP & CONFIG_PM_RUNTIME
> are necessary.
>
> #ifdef CONFIG_PM_SLEEP
> static int *_suspend(struct device *dev)
> [....]
> static int *_resume(struct device *dev)
> [....]
> #endif
>
> #ifdef CONFIG_PM_RUNTIME
> static int *_runtime_suspend(struct device *dev)
> [....]
> static int *_runtime_resume(struct device *dev)
> [....]
> #endif
>
> static const struct dev_pm_ops *_pm_ops = {
> SET_SYSTEM_SLEEP_PM_OPS(*_suspend, *_resume)
> SET_RUNTIME_PM_OPS(*_runtime_suspend, *_runtime_resume, NULL)
> };
>
> static struct {platform/spi/i2c/etc}_driver *_driver = {
> .driver = {
> .pm = pm_ops_ptr(&*_pm_ops),
>
>
>
> Best regards,
> Jingoo Han
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply
* Re: [PATCH v3] backlight: Convert from Legacy pm ops to dev_pm_ops
From: Jingoo Han @ 2013-06-03 4:10 UTC (permalink / raw)
To: Andrew Morton, 'Shuah Khan'
Cc: linux-fbdev, linux-kernel, shuahkhan, rpurdie, FlorianSchandinat,
plagnioj, tomi.valkeinen, rafael.j.wysocki, Jingoo Han
In-Reply-To: <1370128047-2444-1-git-send-email-shuah.kh@samsung.com>
On Sunday, June 02, 2013 8:07 AM, Shuah Khan wrote:
>
> Convert drivers/video/backlight/class to use dev_pm_ops for power
> management and remove Legacy PM ops hooks. With this change, backlight
> class registers suspend/resume callbacks via class->pm (dev_pm_ops)
> instead of Legacy class->suspend/resume. When __device_suspend() runs
> call-backs, it will find class->pm ops for the backlight class.
>
> Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
> Cc: Shuah Khan <shuahkhan@gmail.com>
CC'ed Andrew Morton,
It looks good.
Acked-by: Jingoo Han <jg1.han@samsung.com>
Best regards,
Jingoo Han
> ---
>
> v2: Updated changelog to correct device class.
> v3: Updated changelog to correct device class.
>
> drivers/video/backlight/backlight.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
> index c74e7aa..0ffb251 100644
> --- a/drivers/video/backlight/backlight.c
> +++ b/drivers/video/backlight/backlight.c
> @@ -208,7 +208,7 @@ static ssize_t backlight_show_actual_brightness(struct device *dev,
>
> static struct class *backlight_class;
>
> -static int backlight_suspend(struct device *dev, pm_message_t state)
> +static int backlight_suspend(struct device *dev)
> {
> struct backlight_device *bd = to_backlight_device(dev);
>
> @@ -236,6 +236,9 @@ static int backlight_resume(struct device *dev)
> return 0;
> }
>
> +static SIMPLE_DEV_PM_OPS(backlight_class_dev_pm_ops, backlight_suspend,
> + backlight_resume);
> +
> static void bl_device_release(struct device *dev)
> {
> struct backlight_device *bd = to_backlight_device(dev);
> @@ -414,8 +417,7 @@ static int __init backlight_class_init(void)
> }
>
> backlight_class->dev_attrs = bl_device_attributes;
> - backlight_class->suspend = backlight_suspend;
> - backlight_class->resume = backlight_resume;
> + backlight_class->pm = &backlight_class_dev_pm_ops;
> return 0;
> }
>
> --
> 1.7.10.4
>
^ permalink raw reply
* Re: [PATCH] fbdev: bfin-lq035q1-fb: Use dev_pm_ops
From: Jingoo Han @ 2013-06-03 5:15 UTC (permalink / raw)
To: 'Rafael J. Wysocki'
Cc: 'Jean-Christophe PLAGNIOL-VILLARD',
'Lars-Peter Clausen', 'Michael Hennerich',
'Tomi Valkeinen', linux-fbdev, linux-pm, Jingoo Han
In-Reply-To: <2950029.jFqAppzqh2@vostro.rjw.lan>
On Monday, June 03, 2013 4:30 AM, Rafael J. Wysocki wrote:
> On Friday, May 31, 2013 12:32:57 PM Jingoo Han wrote:
> > On Thursday, May 30, 2013 7:46 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > On 09:52 Thu 30 May , Lars-Peter Clausen wrote:
> > > > On 05/30/2013 09:14 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > > On 09:32 Thu 30 May , Jingoo Han wrote:
> > > > >> On Thursday, May 30, 2013 4:20 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > >>> On 16:24 Wed 29 May , Michael Hennerich wrote:
> > > > >>>> On 05/29/2013 02:17 PM, Lars-Peter Clausen wrote:
> > > > >>>>> Use dev_pm_ops instead of the legacy suspend/resume callbacks.
> > > > >>>>>
> > > > >>>>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> > > > >>>> Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> > > > >>>>> ---
> > > > >>>>> drivers/video/bfin-lq035q1-fb.c | 22 ++++++++++++++--------
> > > > >>>>> 1 file changed, 14 insertions(+), 8 deletions(-)
> > > > >>>>>
> > > > >>>>> diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c
> > > > >>>>> index 29d8c04..6084c17 100644
> > > > >>>>> --- a/drivers/video/bfin-lq035q1-fb.c
> > > > >>>>> +++ b/drivers/video/bfin-lq035q1-fb.c
> > > > >>>>> @@ -170,16 +170,19 @@ static int lq035q1_spidev_remove(struct spi_device *spi)
> > > > >>>>> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > > > >>>>> }
> > > > >>>>> -#ifdef CONFIG_PM
> > > > >>>>> -static int lq035q1_spidev_suspend(struct spi_device *spi, pm_message_t state)
> > > > >>>>> +#ifdef CONFIG_PM_SLEEP
> > > > >>>>> +static int lq035q1_spidev_suspend(struct device *dev)
> > > > >>>>> {
> > > > >>>>> + struct spi_device *spi = to_spi_device(dev);
> > > > >>>>> +
> > > > >>>>> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > > > >>>>> }
> > > > >>>>> -static int lq035q1_spidev_resume(struct spi_device *spi)
> > > > >>>>> +static int lq035q1_spidev_resume(struct device *dev)
> > > > >>>>> {
> > > > >>>>> - int ret;
> > > > >>>>> + struct spi_device *spi = to_spi_device(dev);
> > > > >>>>> struct spi_control *ctl = spi_get_drvdata(spi);
> > > > >>>>> + int ret;
> > > > >>>>> ret = lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
> > > > >>>>> if (ret)
> > > > >>>>> @@ -187,9 +190,13 @@ static int lq035q1_spidev_resume(struct spi_device *spi)
> > > > >>>>> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
> > > > >>>>> }
> > > > >>>>> +
> > > > >>>>> +static SIMPLE_DEV_PM_OPS(lq035q1_spidev_pm_ops, lq035q1_spidev_suspend,
> > > > >>>>> + lq035q1_spidev_resume);
> > > > >>>>> +#define LQ035Q1_SPIDEV_PM_OPS (&lq035q1_spidev_pm_ops)
> > > > >>>>> +
> > > > >>>>> #else
> > > > >>>>> -# define lq035q1_spidev_suspend NULL
> > > > >>>>> -# define lq035q1_spidev_resume NULL
> > > > >>>>> +#define LQ035Q1_SPIDEV_PM_OPS NULL
> > > > >>>>> #endif
> > > > >>> we really need to ahve a macro like for DT of_match_ptr to drop the #else
> > > > >>
> > > > >> Hi Jean-Christophe PLAGNIOL-VILLARD,
> > > > >>
> > > > >> I submitted the following patch. :)
> > > > >> (https://patchwork.kernel.org/patch/2502971/)
> > > > >>
> > > > >> --- a/include/linux/pm.h
> > > > >> +++ b/include/linux/pm.h
> > > > >> @@ -55,8 +55,10 @@ struct device;
> > > > >>
> > > > >> #ifdef CONFIG_PM
> > > > >> extern const char power_group_name[]; /* = "power" */
> > > > >> +#define pm_ops_ptr(_ptr) (_ptr)
> > > > >> #else
> > > > >> #define power_group_name NULL
> > > > >> +#define pm_ops_ptr(_ptr) NULL
> > > > >> #endif
> > > > >>
> > > > >>
> > > > >> This patch was accepted by Rafael Wysocki, and will be merged to v3.11-rc1.
> > > > >>
> > > > > Lars-Peter please update with and
> > > >
> > > > Since the code depends on CONFIG_PM_SLEEP and not CONFIG_PM I don't think
> > > > the macro will work.
> > >
> > > se please ad a similar macros too
> >
> > Hi Jean-Christophe,
> >
> > I added pm_sleep_ops_ptr() as below.
> > Maybe you want it.
> > There is no build warnings below 4 config situations.
> > a) CONFIG_PM is enabled.
> > b) only CONFIG_PM_SLEEP is enabled
> > c) only CONFIG_PM_RUNTIME is enabled
> > d) CONFIG_PM is NOT enabled.
> >
> > --- a/drivers/video/bfin-lq035q1-fb.c
> > +++ b/drivers/video/bfin-lq035q1-fb.c
> > @@ -170,16 +170,19 @@ static int lq035q1_spidev_remove(struct spi_device *spi)
> > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > }
> >
> > -#ifdef CONFIG_PM
> > -static int lq035q1_spidev_suspend(struct spi_device *spi, pm_message_t state)
> > +#ifdef CONFIG_PM_SLEEP
> > +static int lq035q1_spidev_suspend(struct device *dev)
> > {
> > + struct spi_device *spi = to_spi_device(dev);
> > +
> > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> > }
> >
> > -static int lq035q1_spidev_resume(struct spi_device *spi)
> > +static int lq035q1_spidev_resume(struct device *dev)
> > {
> > - int ret;
> > + struct spi_device *spi = to_spi_device(dev);
> > struct spi_control *ctl = spi_get_drvdata(spi);
> > + int ret;
> >
> > ret = lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
> > if (ret)
> > @@ -187,11 +190,11 @@ static int lq035q1_spidev_resume(struct spi_device *spi)
> >
> > return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
> > }
> > -#else
> > -# define lq035q1_spidev_suspend NULL
> > -# define lq035q1_spidev_resume NULL
> > #endif
> >
> > +static SIMPLE_DEV_PM_OPS(lq035q1_spidev_pm_ops, lq035q1_spidev_suspend,
> > + lq035q1_spidev_resume);
> > +
> > /* Power down all displays on reboot, poweroff or halt */
> > static void lq035q1_spidev_shutdown(struct spi_device *spi)
> > {
> > @@ -708,8 +711,7 @@ static int bfin_lq035q1_probe(struct platform_device *pdev)
> > info->spidrv.probe = lq035q1_spidev_probe;
> > info->spidrv.remove = lq035q1_spidev_remove;
> > info->spidrv.shutdown = lq035q1_spidev_shutdown;
> > - info->spidrv.suspend = lq035q1_spidev_suspend;
> > - info->spidrv.resume = lq035q1_spidev_resume;
> > + info->spidrv.driver.pm = pm_sleep_ops_ptr(&lq035q1_spidev_pm_ops);
> >
> > ret = spi_register_driver(&info->spidrv);
> > if (ret < 0) {
> > diff --git a/include/linux/pm.h b/include/linux/pm.h
> > index bd50d15..999d652 100644
> > --- a/include/linux/pm.h
> > +++ b/include/linux/pm.h
> > @@ -61,6 +61,12 @@ extern const char power_group_name[]; /* = "power" */
> > #define pm_ops_ptr(_ptr) NULL
> > #endif
> >
> > +#ifdef CONFIG_PM_SLEEP
> > +#define pm_sleep_ops_ptr(_ptr) (_ptr)
> > +#else
> > +#define pm_sleep_ops_ptr(_ptr) NULL
> > +#endif
> > +
> >
> >
> > Hi Rafael J. Wysocki,
> > How about adding this pm_sleep_ops_ptr() macro?
>
> Are you submitting this instead or in addition to your patch I have in the
> linux-next branch?
Hi Rafael,
I will submit this patch, soon.
Thanks. :)
Best regards,
Jingoo Han
>
> Rafael
>
>
> > My draft idea is below:
> > However, I want other's better ideas. :)
> >
> > 1. The case that only CONFIG_PM_SLEEP is necessary.
> > #ifdef CONFIG_PM_SLEEP
> > static int *_suspend(struct device *dev)
> > [....]
> > static int *_resume(struct device *dev)
> > [....]
> > #endif
> >
> > static SIMPLE_DEV_PM_OPS(*_pm_ops, *_suspend, *_resume);
> >
> > static struct {platform/spi/i2c/etc}_driver *_driver = {
> > .driver = {
> > .pm = pm_sleep_ops_ptr(&*_pm_ops),
> >
> >
> > 2. The case that both CONFIG_PM_SLEEP & CONFIG_PM_RUNTIME
> > are necessary.
> >
> > #ifdef CONFIG_PM_SLEEP
> > static int *_suspend(struct device *dev)
> > [....]
> > static int *_resume(struct device *dev)
> > [....]
> > #endif
> >
> > #ifdef CONFIG_PM_RUNTIME
> > static int *_runtime_suspend(struct device *dev)
> > [....]
> > static int *_runtime_resume(struct device *dev)
> > [....]
> > #endif
> >
> > static const struct dev_pm_ops *_pm_ops = {
> > SET_SYSTEM_SLEEP_PM_OPS(*_suspend, *_resume)
> > SET_RUNTIME_PM_OPS(*_runtime_suspend, *_runtime_resume, NULL)
> > };
> >
> > static struct {platform/spi/i2c/etc}_driver *_driver = {
> > .driver = {
> > .pm = pm_ops_ptr(&*_pm_ops),
> >
> >
> >
> > Best regards,
> > Jingoo Han
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply
* [PATCH] PM: Add pm_sleep_ops_ptr() macro
From: Jingoo Han @ 2013-06-03 6:21 UTC (permalink / raw)
To: 'Rafael J. Wysocki'
Cc: 'Jean-Christophe PLAGNIOL-VILLARD',
'Lars-Peter Clausen', 'Michael Hennerich',
'Tomi Valkeinen', linux-fbdev, linux-pm,
'Jingoo Han'
Add pm_sleep_ops_ptr() macro that allows the .pm entry in the driver structures
to be assigned without having an #define xxx NULL for the case that PM_SLEEP is
not enabled.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
---
drivers/video/bfin-lq035q1-fb.c | 20 +++++++++++---------
include/linux/pm.h | 6 ++++++
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c
index 29d8c04..4474e64 100644
--- a/drivers/video/bfin-lq035q1-fb.c
+++ b/drivers/video/bfin-lq035q1-fb.c
@@ -170,16 +170,19 @@ static int lq035q1_spidev_remove(struct spi_device *spi)
return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
}
-#ifdef CONFIG_PM
-static int lq035q1_spidev_suspend(struct spi_device *spi, pm_message_t state)
+#ifdef CONFIG_PM_SLEEP
+static int lq035q1_spidev_suspend(struct device *dev)
{
+ struct spi_device *spi = to_spi_device(dev);
+
return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
}
-static int lq035q1_spidev_resume(struct spi_device *spi)
+static int lq035q1_spidev_resume(struct device *dev)
{
- int ret;
+ struct spi_device *spi = to_spi_device(dev);
struct spi_control *ctl = spi_get_drvdata(spi);
+ int ret;
ret = lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
if (ret)
@@ -187,11 +190,11 @@ static int lq035q1_spidev_resume(struct spi_device *spi)
return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
}
-#else
-# define lq035q1_spidev_suspend NULL
-# define lq035q1_spidev_resume NULL
#endif
+static SIMPLE_DEV_PM_OPS(lq035q1_spidev_pm_ops, lq035q1_spidev_suspend,
+ lq035q1_spidev_resume);
+
/* Power down all displays on reboot, poweroff or halt */
static void lq035q1_spidev_shutdown(struct spi_device *spi)
{
@@ -708,8 +711,7 @@ static int bfin_lq035q1_probe(struct platform_device *pdev)
info->spidrv.probe = lq035q1_spidev_probe;
info->spidrv.remove = lq035q1_spidev_remove;
info->spidrv.shutdown = lq035q1_spidev_shutdown;
- info->spidrv.suspend = lq035q1_spidev_suspend;
- info->spidrv.resume = lq035q1_spidev_resume;
+ info->spidrv.driver.pm = pm_sleep_ops_ptr(&lq035q1_spidev_pm_ops);
ret = spi_register_driver(&info->spidrv);
if (ret < 0) {
diff --git a/include/linux/pm.h b/include/linux/pm.h
index bd50d15..999d652 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -61,6 +61,12 @@ extern const char power_group_name[]; /* = "power" */
#define pm_ops_ptr(_ptr) NULL
#endif
+#ifdef CONFIG_PM_SLEEP
+#define pm_sleep_ops_ptr(_ptr) (_ptr)
+#else
+#define pm_sleep_ops_ptr(_ptr) NULL
+#endif
+
typedef struct pm_message {
int event;
} pm_message_t;
--
1.7.10.4
^ permalink raw reply related
* Re: linux-next: fbdev-next inclusing
From: Stephen Rothwell @ 2013-06-03 6:35 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20130531051325.GQ19468@game.jcrosoft.org>
[-- Attachment #1: Type: text/plain, Size: 2091 bytes --]
Hi,
On Fri, 31 May 2013 07:13:25 +0200 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> wrote:
>
> Could you include the new fbdev -next in the linux-next please?
>
> git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev.git for-next
I have replaced Florian's tree with this one. Let me know if you want
something different. Also, the contacts for this tree are now:
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
linux-fbdev@vger.kernel.org
Thanks for adding your subsystem tree as a participant of linux-next. As
you may know, this is not a judgment of your code. The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window.
You will need to ensure that the patches/commits in your tree/series have
been:
* submitted under GPL v2 (or later) and include the Contributor's
Signed-off-by,
* posted to the relevant mailing list,
* reviewed by you (or another maintainer of your subsystem tree),
* successfully unit tested, and
* destined for the current or next Linux merge window.
Basically, this should be just what you would send to Linus (or ask him
to fetch). It is allowed to be rebased if you deem it necessary.
--
Cheers,
Stephen Rothwell
sfr@canb.auug.org.au
Legal Stuff:
By participating in linux-next, your subsystem tree contributions are
public and will be included in the linux-next trees. You may be sent
e-mail messages indicating errors or other issues when the
patches/commits from your subsystem tree are merged and tested in
linux-next. These messages may also be cross-posted to the linux-next
mailing list, the linux-kernel mailing list, etc. The linux-next tree
project and IBM (my employer) make no warranties regarding the linux-next
project, the testing procedures, the results, the e-mails, etc. If you
don't agree to these ground rules, let me know and I'll remove your tree
from participation in linux-next.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* [PATCH v4 0/7] xilinxfb changes
From: Michal Simek @ 2013-06-03 10:13 UTC (permalink / raw)
To: linux-kernel
Cc: Michal Simek, Michal Simek, Arnd Bergmann, Timur Tabi,
devicetree-discuss, linux-fbdev, Tomi Valkeinen, Grant Likely,
Jean-Christophe Plagniol-Villard, Rob Herring
[-- Attachment #1: Type: text/plain, Size: 1426 bytes --]
Hi,
I have done more changes in the driver to support probing
on little and big endian system where detection is done
directly on the hardware.
I have also done some cleanups to get it to the better shape.
Thanks for your review,
Michal
Changes in v4:
- Acked by Arnd
- Remove "video: xilinxfb: Fix sparse warnings"
patch because it is trying to fix incorrect API
usage and sparse should warn about it.
Changes in v3:
- fix commit message
- Remove out_be IO name from function name
- Change patch subject from "Do not use out_be32 IO function"
to "Do not name out_be32 in function name"
- New patch in this patchset based on discussions
- New patch in this patchset based on discussions
- New patch in this patchset
- New patch in this patchset based on discussions
Changes in v2:
- use of_property_read_u32 helper function
Michal Simek (7):
video: xilinxfb: Fix OF probing on little-endian systems
video: xilinxfb: Do not name out_be32 in function name
video: xilinxfb: Rename PLB_ACCESS_FLAG to BUS_ACCESS_FLAG
video: xilinxfb: Use drvdata->regs_phys instead of physaddr
video: xilinxfb: Group bus initialization
video: xilinxfb: Add support for little endian accesses
video: xilinxfb: Use driver for Xilinx ARM Zynq
drivers/video/Kconfig | 2 +-
drivers/video/xilinxfb.c | 135 +++++++++++++++++++++++------------------------
2 files changed, 68 insertions(+), 69 deletions(-)
--
1.8.2.3
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* [PATCH v4 1/7] video: xilinxfb: Fix OF probing on little-endian systems
From: Michal Simek @ 2013-06-03 10:13 UTC (permalink / raw)
To: linux-kernel
Cc: Michal Simek, Michal Simek, Arnd Bergmann, Timur Tabi,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Grant Likely,
Rob Herring, linux-fbdev, devicetree-discuss
In-Reply-To: <cover.1370254386.git.michal.simek@xilinx.com>
[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]
From: Michal Simek <monstr@monstr.eu>
DTB is always big-endian that's why it is necessary
to properly convert value (*p).
It is automatically done in of_property_read_u32().
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
Changes in v4: None
Changes in v3:
- fix commit message
Changes in v2:
- use of_property_read_u32 helper function
drivers/video/xilinxfb.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index af0b4fd..aecd15d 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -406,8 +406,7 @@ static int xilinxfb_release(struct device *dev)
static int xilinxfb_of_probe(struct platform_device *op)
{
const u32 *prop;
- u32 *p;
- u32 tft_access;
+ u32 tft_access = 0;
struct xilinxfb_platform_data pdata;
struct resource res;
int size, rc;
@@ -427,8 +426,8 @@ static int xilinxfb_of_probe(struct platform_device *op)
* To check whether the core is connected directly to DCR or PLB
* interface and initialize the tft_access accordingly.
*/
- p = (u32 *)of_get_property(op->dev.of_node, "xlnx,dcr-splb-slave-if", NULL);
- tft_access = p ? *p : 0;
+ of_property_read_u32(op->dev.of_node, "xlnx,dcr-splb-slave-if",
+ &tft_access);
/*
* Fill the resource structure if its direct PLB interface
--
1.8.2.3
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related
* [PATCH v4 2/7] video: xilinxfb: Do not name out_be32 in function name
From: Michal Simek @ 2013-06-03 10:13 UTC (permalink / raw)
To: linux-kernel
Cc: Michal Simek, Michal Simek, Arnd Bergmann, Timur Tabi,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, linux-fbdev
In-Reply-To: <cover.1370254386.git.michal.simek@xilinx.com>
[-- Attachment #1: Type: text/plain, Size: 3228 bytes --]
out_be32 IO function is not supported by ARM.
It is only available for PPC and Microblaze.
Because this driver can be used on ARM let's
remove out_be32 from function name.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
Changes in v4: None
Changes in v3:
- Remove out_be IO name from function name
- Change patch subject from "Do not use out_be32 IO function"
to "Do not name out_be32 in function name"
Changes in v2: None
drivers/video/xilinxfb.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index aecd15d..c9b442b 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -57,7 +57,7 @@
* In case of direct PLB access the second control register will be at
* an offset of 4 as compared to the DCR access where the offset is 1
* i.e. REG_CTRL. So this is taken care in the function
- * xilinx_fb_out_be32 where it left shifts the offset 2 times in case of
+ * xilinx_fb_out32 where it left shifts the offset 2 times in case of
* direct PLB access.
*/
#define NUM_REGS 2
@@ -150,7 +150,7 @@ struct xilinxfb_drvdata {
* To perform the read/write on the registers we need to check on
* which bus its connected and call the appropriate write API.
*/
-static void xilinx_fb_out_be32(struct xilinxfb_drvdata *drvdata, u32 offset,
+static void xilinx_fb_out32(struct xilinxfb_drvdata *drvdata, u32 offset,
u32 val)
{
if (drvdata->flags & PLB_ACCESS_FLAG)
@@ -197,7 +197,7 @@ xilinx_fb_blank(int blank_mode, struct fb_info *fbi)
switch (blank_mode) {
case FB_BLANK_UNBLANK:
/* turn on panel */
- xilinx_fb_out_be32(drvdata, REG_CTRL, drvdata->reg_ctrl_default);
+ xilinx_fb_out32(drvdata, REG_CTRL, drvdata->reg_ctrl_default);
break;
case FB_BLANK_NORMAL:
@@ -205,7 +205,7 @@ xilinx_fb_blank(int blank_mode, struct fb_info *fbi)
case FB_BLANK_HSYNC_SUSPEND:
case FB_BLANK_POWERDOWN:
/* turn off panel */
- xilinx_fb_out_be32(drvdata, REG_CTRL, 0);
+ xilinx_fb_out32(drvdata, REG_CTRL, 0);
default:
break;
@@ -280,13 +280,13 @@ static int xilinxfb_assign(struct device *dev,
memset_io((void __iomem *)drvdata->fb_virt, 0, fbsize);
/* Tell the hardware where the frame buffer is */
- xilinx_fb_out_be32(drvdata, REG_FB_ADDR, drvdata->fb_phys);
+ xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys);
/* Turn on the display */
drvdata->reg_ctrl_default = REG_CTRL_ENABLE;
if (pdata->rotate_screen)
drvdata->reg_ctrl_default |= REG_CTRL_ROTATE;
- xilinx_fb_out_be32(drvdata, REG_CTRL,
+ xilinx_fb_out32(drvdata, REG_CTRL,
drvdata->reg_ctrl_default);
/* Fill struct fb_info */
@@ -345,7 +345,7 @@ err_cmap:
iounmap(drvdata->fb_virt);
/* Turn off the display */
- xilinx_fb_out_be32(drvdata, REG_CTRL, 0);
+ xilinx_fb_out32(drvdata, REG_CTRL, 0);
err_fbmem:
if (drvdata->flags & PLB_ACCESS_FLAG)
@@ -381,7 +381,7 @@ static int xilinxfb_release(struct device *dev)
iounmap(drvdata->fb_virt);
/* Turn off the display */
- xilinx_fb_out_be32(drvdata, REG_CTRL, 0);
+ xilinx_fb_out32(drvdata, REG_CTRL, 0);
/* Release the resources, as allocated based on interface */
if (drvdata->flags & PLB_ACCESS_FLAG) {
--
1.8.2.3
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related
* [PATCH v4 3/7] video: xilinxfb: Rename PLB_ACCESS_FLAG to BUS_ACCESS_FLAG
From: Michal Simek @ 2013-06-03 10:13 UTC (permalink / raw)
To: linux-kernel
Cc: Michal Simek, Michal Simek, Arnd Bergmann, Timur Tabi,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, linux-fbdev
In-Reply-To: <cover.1370254386.git.michal.simek@xilinx.com>
[-- Attachment #1: Type: text/plain, Size: 4821 bytes --]
Using only PLB name is wrong for a long time because
the same access functions are also used for AXI.
s/PLB/BUS/g
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
Changes in v4: None
Changes in v3:
- New patch in this patchset based on discussions
Changes in v2: None
drivers/video/xilinxfb.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index c9b442b..d94c992 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -44,7 +44,7 @@
/*
- * Xilinx calls it "PLB TFT LCD Controller" though it can also be used for
+ * Xilinx calls it "TFT LCD Controller" though it can also be used for
* the VGA port on the Xilinx ML40x board. This is a hardware display
* controller for a 640x480 resolution TFT or VGA screen.
*
@@ -54,11 +54,11 @@
* don't start thinking about scrolling). The second allows the LCD to
* be turned on or off as well as rotated 180 degrees.
*
- * In case of direct PLB access the second control register will be at
+ * In case of direct BUS access the second control register will be at
* an offset of 4 as compared to the DCR access where the offset is 1
* i.e. REG_CTRL. So this is taken care in the function
* xilinx_fb_out32 where it left shifts the offset 2 times in case of
- * direct PLB access.
+ * direct BUS access.
*/
#define NUM_REGS 2
#define REG_FB_ADDR 0
@@ -116,7 +116,7 @@ static struct fb_var_screeninfo xilinx_fb_var = {
};
-#define PLB_ACCESS_FLAG 0x1 /* 1 = PLB, 0 = DCR */
+#define BUS_ACCESS_FLAG 0x1 /* 1 = BUS, 0 = DCR */
struct xilinxfb_drvdata {
@@ -146,14 +146,14 @@ struct xilinxfb_drvdata {
container_of(_info, struct xilinxfb_drvdata, info)
/*
- * The XPS TFT Controller can be accessed through PLB or DCR interface.
+ * The XPS TFT Controller can be accessed through BUS or DCR interface.
* To perform the read/write on the registers we need to check on
* which bus its connected and call the appropriate write API.
*/
static void xilinx_fb_out32(struct xilinxfb_drvdata *drvdata, u32 offset,
u32 val)
{
- if (drvdata->flags & PLB_ACCESS_FLAG)
+ if (drvdata->flags & BUS_ACCESS_FLAG)
out_be32(drvdata->regs + (offset << 2), val);
#ifdef CONFIG_PPC_DCR
else
@@ -235,10 +235,10 @@ static int xilinxfb_assign(struct device *dev,
int rc;
int fbsize = pdata->xvirt * pdata->yvirt * BYTES_PER_PIXEL;
- if (drvdata->flags & PLB_ACCESS_FLAG) {
+ if (drvdata->flags & BUS_ACCESS_FLAG) {
/*
* Map the control registers in if the controller
- * is on direct PLB interface.
+ * is on direct BUS interface.
*/
if (!request_mem_region(physaddr, 8, DRIVER_NAME)) {
dev_err(dev, "Couldn't lock memory region at 0x%08lX\n",
@@ -270,7 +270,7 @@ static int xilinxfb_assign(struct device *dev,
if (!drvdata->fb_virt) {
dev_err(dev, "Could not allocate frame buffer memory\n");
rc = -ENOMEM;
- if (drvdata->flags & PLB_ACCESS_FLAG)
+ if (drvdata->flags & BUS_ACCESS_FLAG)
goto err_fbmem;
else
goto err_region;
@@ -323,7 +323,7 @@ static int xilinxfb_assign(struct device *dev,
goto err_regfb;
}
- if (drvdata->flags & PLB_ACCESS_FLAG) {
+ if (drvdata->flags & BUS_ACCESS_FLAG) {
/* Put a banner in the log (for DEBUG) */
dev_dbg(dev, "regs: phys=%lx, virt=%p\n", physaddr,
drvdata->regs);
@@ -348,11 +348,11 @@ err_cmap:
xilinx_fb_out32(drvdata, REG_CTRL, 0);
err_fbmem:
- if (drvdata->flags & PLB_ACCESS_FLAG)
+ if (drvdata->flags & BUS_ACCESS_FLAG)
iounmap(drvdata->regs);
err_map:
- if (drvdata->flags & PLB_ACCESS_FLAG)
+ if (drvdata->flags & BUS_ACCESS_FLAG)
release_mem_region(physaddr, 8);
err_region:
@@ -384,7 +384,7 @@ static int xilinxfb_release(struct device *dev)
xilinx_fb_out32(drvdata, REG_CTRL, 0);
/* Release the resources, as allocated based on interface */
- if (drvdata->flags & PLB_ACCESS_FLAG) {
+ if (drvdata->flags & BUS_ACCESS_FLAG) {
iounmap(drvdata->regs);
release_mem_region(drvdata->regs_phys, 8);
}
@@ -423,18 +423,18 @@ static int xilinxfb_of_probe(struct platform_device *op)
}
/*
- * To check whether the core is connected directly to DCR or PLB
+ * To check whether the core is connected directly to DCR or BUS
* interface and initialize the tft_access accordingly.
*/
of_property_read_u32(op->dev.of_node, "xlnx,dcr-splb-slave-if",
&tft_access);
/*
- * Fill the resource structure if its direct PLB interface
+ * Fill the resource structure if its direct BUS interface
* otherwise fill the dcr_host structure.
*/
if (tft_access) {
- drvdata->flags |= PLB_ACCESS_FLAG;
+ drvdata->flags |= BUS_ACCESS_FLAG;
rc = of_address_to_resource(op->dev.of_node, 0, &res);
if (rc) {
dev_err(&op->dev, "invalid address\n");
--
1.8.2.3
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related
* [PATCH v4 4/7] video: xilinxfb: Use drvdata->regs_phys instead of physaddr
From: Michal Simek @ 2013-06-03 10:13 UTC (permalink / raw)
To: linux-kernel
Cc: Michal Simek, Michal Simek, Arnd Bergmann, Timur Tabi,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, linux-fbdev
In-Reply-To: <cover.1370254386.git.michal.simek@xilinx.com>
[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]
physaddr will be remove in the next patch.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
Changes in v4: None
Changes in v3:
- New patch in this patchset based on discussions
Changes in v2: None
drivers/video/xilinxfb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index d94c992..1b55f18 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -325,7 +325,7 @@ static int xilinxfb_assign(struct device *dev,
if (drvdata->flags & BUS_ACCESS_FLAG) {
/* Put a banner in the log (for DEBUG) */
- dev_dbg(dev, "regs: phys=%lx, virt=%p\n", physaddr,
+ dev_dbg(dev, "regs: phys=%x, virt=%p\n", drvdata->regs_phys,
drvdata->regs);
}
/* Put a banner in the log (for DEBUG) */
@@ -353,7 +353,7 @@ err_fbmem:
err_map:
if (drvdata->flags & BUS_ACCESS_FLAG)
- release_mem_region(physaddr, 8);
+ release_mem_region(drvdata->regs_phys, 8);
err_region:
kfree(drvdata);
--
1.8.2.3
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related
* [PATCH v4 5/7] video: xilinxfb: Group bus initialization
From: Michal Simek @ 2013-06-03 10:13 UTC (permalink / raw)
To: linux-kernel
Cc: Michal Simek, Michal Simek, Arnd Bergmann, Timur Tabi,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, linux-fbdev
In-Reply-To: <cover.1370254386.git.michal.simek@xilinx.com>
[-- Attachment #1: Type: text/plain, Size: 3817 bytes --]
Move of_address_to_resource() to xilinxfb_assign()
which simplify driver probing.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
Changes in v4: None
Changes in v3:
- New patch in this patchset
Changes in v2: None
drivers/video/xilinxfb.c | 56 +++++++++++++-----------------------------------
1 file changed, 15 insertions(+), 41 deletions(-)
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index 1b55f18..bd3b85d 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -227,33 +227,23 @@ static struct fb_ops xilinxfb_ops =
* Bus independent setup/teardown
*/
-static int xilinxfb_assign(struct device *dev,
+static int xilinxfb_assign(struct platform_device *pdev,
struct xilinxfb_drvdata *drvdata,
- unsigned long physaddr,
struct xilinxfb_platform_data *pdata)
{
int rc;
+ struct device *dev = &pdev->dev;
int fbsize = pdata->xvirt * pdata->yvirt * BYTES_PER_PIXEL;
if (drvdata->flags & BUS_ACCESS_FLAG) {
- /*
- * Map the control registers in if the controller
- * is on direct BUS interface.
- */
- if (!request_mem_region(physaddr, 8, DRIVER_NAME)) {
- dev_err(dev, "Couldn't lock memory region at 0x%08lX\n",
- physaddr);
- rc = -ENODEV;
- goto err_region;
- }
+ struct resource *res;
- drvdata->regs_phys = physaddr;
- drvdata->regs = ioremap(physaddr, 8);
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ drvdata->regs_phys = res->start;
+ drvdata->regs = devm_request_and_ioremap(&pdev->dev, res);
if (!drvdata->regs) {
- dev_err(dev, "Couldn't lock memory region at 0x%08lX\n",
- physaddr);
- rc = -ENODEV;
- goto err_map;
+ rc = -EADDRNOTAVAIL;
+ goto err_region;
}
}
@@ -349,11 +339,7 @@ err_cmap:
err_fbmem:
if (drvdata->flags & BUS_ACCESS_FLAG)
- iounmap(drvdata->regs);
-
-err_map:
- if (drvdata->flags & BUS_ACCESS_FLAG)
- release_mem_region(drvdata->regs_phys, 8);
+ devm_iounmap(dev, drvdata->regs);
err_region:
kfree(drvdata);
@@ -384,10 +370,8 @@ static int xilinxfb_release(struct device *dev)
xilinx_fb_out32(drvdata, REG_CTRL, 0);
/* Release the resources, as allocated based on interface */
- if (drvdata->flags & BUS_ACCESS_FLAG) {
- iounmap(drvdata->regs);
- release_mem_region(drvdata->regs_phys, 8);
- }
+ if (drvdata->flags & BUS_ACCESS_FLAG)
+ devm_iounmap(dev, drvdata->regs);
#ifdef CONFIG_PPC_DCR
else
dcr_unmap(drvdata->dcr_host, drvdata->dcr_len);
@@ -408,8 +392,7 @@ static int xilinxfb_of_probe(struct platform_device *op)
const u32 *prop;
u32 tft_access = 0;
struct xilinxfb_platform_data pdata;
- struct resource res;
- int size, rc;
+ int size;
struct xilinxfb_drvdata *drvdata;
/* Copy with the default pdata (not a ptr reference!) */
@@ -435,22 +418,17 @@ static int xilinxfb_of_probe(struct platform_device *op)
*/
if (tft_access) {
drvdata->flags |= BUS_ACCESS_FLAG;
- rc = of_address_to_resource(op->dev.of_node, 0, &res);
- if (rc) {
- dev_err(&op->dev, "invalid address\n");
- goto err;
- }
}
#ifdef CONFIG_PPC_DCR
else {
int start;
- res.start = 0;
start = dcr_resource_start(op->dev.of_node, 0);
drvdata->dcr_len = dcr_resource_len(op->dev.of_node, 0);
drvdata->dcr_host = dcr_map(op->dev.of_node, start, drvdata->dcr_len);
if (!DCR_MAP_OK(drvdata->dcr_host)) {
dev_err(&op->dev, "invalid DCR address\n");
- goto err;
+ kfree(drvdata);
+ return -ENODEV;
}
}
#endif
@@ -477,11 +455,7 @@ static int xilinxfb_of_probe(struct platform_device *op)
pdata.rotate_screen = 1;
dev_set_drvdata(&op->dev, drvdata);
- return xilinxfb_assign(&op->dev, drvdata, res.start, &pdata);
-
- err:
- kfree(drvdata);
- return -ENODEV;
+ return xilinxfb_assign(op, drvdata, &pdata);
}
static int xilinxfb_of_remove(struct platform_device *op)
--
1.8.2.3
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related
* [PATCH v4 6/7] video: xilinxfb: Add support for little endian accesses
From: Michal Simek @ 2013-06-03 10:13 UTC (permalink / raw)
To: linux-kernel
Cc: Michal Simek, Michal Simek, Arnd Bergmann, Timur Tabi,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, linux-fbdev
In-Reply-To: <cover.1370254386.git.michal.simek@xilinx.com>
[-- Attachment #1: Type: text/plain, Size: 2359 bytes --]
Dynamically detect endianess on IP and use
ioread/iowrite functions instead of powerpc and microblaze
specific out_be32.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
Changes in v4:
- Acked by Arnd
Changes in v3:
- New patch in this patchset based on discussions
Changes in v2: None
drivers/video/xilinxfb.c | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index bd3b85d..f3d4a69 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -117,6 +117,7 @@ static struct fb_var_screeninfo xilinx_fb_var = {
#define BUS_ACCESS_FLAG 0x1 /* 1 = BUS, 0 = DCR */
+#define LITTLE_ENDIAN_ACCESS 0x2 /* LITTLE ENDIAN IO functions */
struct xilinxfb_drvdata {
@@ -153,14 +154,33 @@ struct xilinxfb_drvdata {
static void xilinx_fb_out32(struct xilinxfb_drvdata *drvdata, u32 offset,
u32 val)
{
- if (drvdata->flags & BUS_ACCESS_FLAG)
- out_be32(drvdata->regs + (offset << 2), val);
+ if (drvdata->flags & BUS_ACCESS_FLAG) {
+ if (drvdata->flags & LITTLE_ENDIAN_ACCESS)
+ iowrite32(val, drvdata->regs + (offset << 2));
+ else
+ iowrite32be(val, drvdata->regs + (offset << 2));
+ }
#ifdef CONFIG_PPC_DCR
else
dcr_write(drvdata->dcr_host, offset, val);
#endif
}
+static u32 xilinx_fb_in32(struct xilinxfb_drvdata *drvdata, u32 offset)
+{
+ if (drvdata->flags & BUS_ACCESS_FLAG) {
+ if (drvdata->flags & LITTLE_ENDIAN_ACCESS)
+ return ioread32(drvdata->regs + (offset << 2));
+ else
+ return ioread32be(drvdata->regs + (offset << 2));
+ }
+#ifdef CONFIG_PPC_DCR
+ else
+ return dcr_read(drvdata->dcr_host, offset);
+#endif
+ return 0;
+}
+
static int
xilinx_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue,
unsigned transp, struct fb_info *fbi)
@@ -271,6 +291,12 @@ static int xilinxfb_assign(struct platform_device *pdev,
/* Tell the hardware where the frame buffer is */
xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys);
+ rc = xilinx_fb_in32(drvdata, REG_FB_ADDR);
+ /* Endianess detection */
+ if (rc != drvdata->fb_phys) {
+ drvdata->flags |= LITTLE_ENDIAN_ACCESS;
+ xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys);
+ }
/* Turn on the display */
drvdata->reg_ctrl_default = REG_CTRL_ENABLE;
--
1.8.2.3
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related
* [PATCH v4 7/7] video: xilinxfb: Use driver for Xilinx ARM Zynq
From: Michal Simek @ 2013-06-03 10:13 UTC (permalink / raw)
To: linux-kernel
Cc: Michal Simek, Michal Simek, Arnd Bergmann, Timur Tabi,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, linux-fbdev
In-Reply-To: <cover.1370254386.git.michal.simek@xilinx.com>
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
From: Michal Simek <monstr@monstr.eu>
Enable this driver for all Xilinx platforms.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
Changes in v4:
- Remove "video: xilinxfb: Fix sparse warnings"
patch because it is trying to fix incorrect API
usage and sparse should warn about it.
Changes in v3: None
Changes in v2: None
drivers/video/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 2e937bd..2c301f8 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -2188,7 +2188,7 @@ config FB_PS3_DEFAULT_SIZE_M
config FB_XILINX
tristate "Xilinx frame buffer support"
- depends on FB && (XILINX_VIRTEX || MICROBLAZE)
+ depends on FB && (XILINX_VIRTEX || MICROBLAZE || ARCH_ZYNQ)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
--
1.8.2.3
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related
* Re: [PATCH] PM: Add pm_sleep_ops_ptr() macro
From: Rafael J. Wysocki @ 2013-06-03 11:11 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Jean-Christophe PLAGNIOL-VILLARD',
'Lars-Peter Clausen', 'Michael Hennerich',
'Tomi Valkeinen', linux-fbdev, linux-pm
In-Reply-To: <002801ce6022$a2928930$e7b79b90$@samsung.com>
On Monday, June 03, 2013 03:21:51 PM Jingoo Han wrote:
> Add pm_sleep_ops_ptr() macro that allows the .pm entry in the driver structures
> to be assigned without having an #define xxx NULL for the case that PM_SLEEP is
> not enabled.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Michael Hennerich <michael.hennerich@analog.com>
Do you want me to replace the previous patch with this?
Rafael
> ---
> drivers/video/bfin-lq035q1-fb.c | 20 +++++++++++---------
> include/linux/pm.h | 6 ++++++
> 2 files changed, 17 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c
> index 29d8c04..4474e64 100644
> --- a/drivers/video/bfin-lq035q1-fb.c
> +++ b/drivers/video/bfin-lq035q1-fb.c
> @@ -170,16 +170,19 @@ static int lq035q1_spidev_remove(struct spi_device *spi)
> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> }
>
> -#ifdef CONFIG_PM
> -static int lq035q1_spidev_suspend(struct spi_device *spi, pm_message_t state)
> +#ifdef CONFIG_PM_SLEEP
> +static int lq035q1_spidev_suspend(struct device *dev)
> {
> + struct spi_device *spi = to_spi_device(dev);
> +
> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_SHUT);
> }
>
> -static int lq035q1_spidev_resume(struct spi_device *spi)
> +static int lq035q1_spidev_resume(struct device *dev)
> {
> - int ret;
> + struct spi_device *spi = to_spi_device(dev);
> struct spi_control *ctl = spi_get_drvdata(spi);
> + int ret;
>
> ret = lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode);
> if (ret)
> @@ -187,11 +190,11 @@ static int lq035q1_spidev_resume(struct spi_device *spi)
>
> return lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON);
> }
> -#else
> -# define lq035q1_spidev_suspend NULL
> -# define lq035q1_spidev_resume NULL
> #endif
>
> +static SIMPLE_DEV_PM_OPS(lq035q1_spidev_pm_ops, lq035q1_spidev_suspend,
> + lq035q1_spidev_resume);
> +
> /* Power down all displays on reboot, poweroff or halt */
> static void lq035q1_spidev_shutdown(struct spi_device *spi)
> {
> @@ -708,8 +711,7 @@ static int bfin_lq035q1_probe(struct platform_device *pdev)
> info->spidrv.probe = lq035q1_spidev_probe;
> info->spidrv.remove = lq035q1_spidev_remove;
> info->spidrv.shutdown = lq035q1_spidev_shutdown;
> - info->spidrv.suspend = lq035q1_spidev_suspend;
> - info->spidrv.resume = lq035q1_spidev_resume;
> + info->spidrv.driver.pm = pm_sleep_ops_ptr(&lq035q1_spidev_pm_ops);
>
> ret = spi_register_driver(&info->spidrv);
> if (ret < 0) {
> diff --git a/include/linux/pm.h b/include/linux/pm.h
> index bd50d15..999d652 100644
> --- a/include/linux/pm.h
> +++ b/include/linux/pm.h
> @@ -61,6 +61,12 @@ extern const char power_group_name[]; /* = "power" */
> #define pm_ops_ptr(_ptr) NULL
> #endif
>
> +#ifdef CONFIG_PM_SLEEP
> +#define pm_sleep_ops_ptr(_ptr) (_ptr)
> +#else
> +#define pm_sleep_ops_ptr(_ptr) NULL
> +#endif
> +
> typedef struct pm_message {
> int event;
> } pm_message_t;
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply
* Re: [PATCH] PM: Add pm_sleep_ops_ptr() macro
From: Rafael J. Wysocki @ 2013-06-03 19:54 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Jean-Christophe PLAGNIOL-VILLARD',
'Lars-Peter Clausen', 'Michael Hennerich',
'Tomi Valkeinen', linux-fbdev, linux-pm
In-Reply-To: <1867006.c6mxKpbPvX@vostro.rjw.lan>
On Monday, June 03, 2013 01:11:07 PM Rafael J. Wysocki wrote:
> On Monday, June 03, 2013 03:21:51 PM Jingoo Han wrote:
> > Add pm_sleep_ops_ptr() macro that allows the .pm entry in the driver structures
> > to be assigned without having an #define xxx NULL for the case that PM_SLEEP is
> > not enabled.
> >
> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> > Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > Cc: Lars-Peter Clausen <lars@metafoo.de>
> > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> > Cc: Michael Hennerich <michael.hennerich@analog.com>
>
> Do you want me to replace the previous patch with this?
Quite frankly, I prefer the previous version, which was more general.
That is, what if someone wants to use that macro for runtime PM too?
Honestly, I think we'll be better off without any of them, so I'm dropping
the previous patch too for now.
Thanks,
Rafael
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply
* Re: linux-next: Tree for Jun 3 (fonts.c & vivi)
From: Randy Dunlap @ 2013-06-03 20:34 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, linux-kernel, linux-media, linux-fbdev
In-Reply-To: <20130603163717.a6f78476e57d92fadd6f6a23@canb.auug.org.au>
On 06/02/13 23:37, Stephen Rothwell wrote:
> Hi all,
>
> Changes since 20130531:
>
on x86_64:
warning: (VIDEO_VIVI && USB_SISUSBVGA && SOLO6X10) selects FONT_SUPPORT which has unmet direct dependencies (HAS_IOMEM && VT)
warning: (VIDEO_VIVI && FB_VGA16 && FB_S3 && FB_VT8623 && FB_ARK && USB_SISUSBVGA_CON && SOLO6X10) selects FONT_8x16 which has unmet direct dependencies (HAS_IOMEM && VT && FONT_SUPPORT)
drivers/built-in.o: In function `vivi_init':
vivi.c:(.init.text+0x1a3da): undefined reference to `find_font'
when CONFIG_VT is not enabled.
Just make CONFIG_VIDEO_VIVI depend on VT ?
--
~Randy
^ permalink raw reply
* Re: linux-next: Tree for Jun 3 (fonts.c & vivi)
From: Geert Uytterhoeven @ 2013-06-03 20:54 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, Linux-Next, linux-kernel@vger.kernel.org,
linux-media, Linux Fbdev development list
In-Reply-To: <51ACFDF2.4040600@infradead.org>
On Mon, Jun 3, 2013 at 10:34 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
> On 06/02/13 23:37, Stephen Rothwell wrote:
>> Changes since 20130531:
> on x86_64:
>
> warning: (VIDEO_VIVI && USB_SISUSBVGA && SOLO6X10) selects FONT_SUPPORT which has unmet direct dependencies (HAS_IOMEM && VT)
> warning: (VIDEO_VIVI && FB_VGA16 && FB_S3 && FB_VT8623 && FB_ARK && USB_SISUSBVGA_CON && SOLO6X10) selects FONT_8x16 which has unmet direct dependencies (HAS_IOMEM && VT && FONT_SUPPORT)
I knew about thet warning. But I thought it was harmless, as none of the font
code really depends on console support...
> drivers/built-in.o: In function `vivi_init':
> vivi.c:(.init.text+0x1a3da): undefined reference to `find_font'
>
> when CONFIG_VT is not enabled.
... but I missed that drivers/video/console is not used if CONFIG_VT=y.
Sorry for that.
> Just make CONFIG_VIDEO_VIVI depend on VT ?
Does this (whitespace-damaged copy-and-paste) help?
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -12,7 +12,7 @@ fb-y := fbmem.o fbmon.o fbcmap.o
modedb.o fbcvt.o
fb-objs := $(fb-y)
-obj-$(CONFIG_VT) += console/
+obj-y += console/
obj-$(CONFIG_LOGO) += logo/
obj-y += backlight/
It shouldn't make a difference if nothing inside drivers/video/console
is enabled,
as all objects in drivers/video/console/Makefile are conditional.
BTW, my plan was to move the font code to lib/font, but I haven't done that yet.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* Re: linux-next: Tree for Jun 3 (fonts.c & vivi)
From: Randy Dunlap @ 2013-06-03 21:06 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Stephen Rothwell, Linux-Next, linux-kernel@vger.kernel.org,
linux-media, Linux Fbdev development list
In-Reply-To: <CAMuHMdUALrScFE895xRiBvgUpVa9Tvic5M7YxefrEgyeMaSjhw@mail.gmail.com>
On 06/03/13 13:54, Geert Uytterhoeven wrote:
> On Mon, Jun 3, 2013 at 10:34 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
>> On 06/02/13 23:37, Stephen Rothwell wrote:
>>> Changes since 20130531:
>> on x86_64:
>>
>> warning: (VIDEO_VIVI && USB_SISUSBVGA && SOLO6X10) selects FONT_SUPPORT which has unmet direct dependencies (HAS_IOMEM && VT)
>> warning: (VIDEO_VIVI && FB_VGA16 && FB_S3 && FB_VT8623 && FB_ARK && USB_SISUSBVGA_CON && SOLO6X10) selects FONT_8x16 which has unmet direct dependencies (HAS_IOMEM && VT && FONT_SUPPORT)
>
> I knew about thet warning. But I thought it was harmless, as none of the font
> code really depends on console support...
>
>> drivers/built-in.o: In function `vivi_init':
>> vivi.c:(.init.text+0x1a3da): undefined reference to `find_font'
>>
>> when CONFIG_VT is not enabled.
>
> ... but I missed that drivers/video/console is not used if CONFIG_VT=y.
> Sorry for that.
>
>> Just make CONFIG_VIDEO_VIVI depend on VT ?
>
> Does this (whitespace-damaged copy-and-paste) help?
Yes, that works. Thanks.
Acked-by: Randy Dunlap <rdunlap@infradead.org>
> --- a/drivers/video/Makefile
> +++ b/drivers/video/Makefile
> @@ -12,7 +12,7 @@ fb-y := fbmem.o fbmon.o fbcmap.o
> modedb.o fbcvt.o
> fb-objs := $(fb-y)
>
> -obj-$(CONFIG_VT) += console/
> +obj-y += console/
> obj-$(CONFIG_LOGO) += logo/
> obj-y += backlight/
>
> It shouldn't make a difference if nothing inside drivers/video/console
> is enabled,
> as all objects in drivers/video/console/Makefile are conditional.
>
> BTW, my plan was to move the font code to lib/font, but I haven't done that yet.
--
~Randy
^ permalink raw reply
* Re: [PATCH] video: display_timing: make parameter const
From: Laurent Pinchart @ 2013-06-04 1:21 UTC (permalink / raw)
To: dri-devel; +Cc: Dave Airlie, linux-fbdev, Florian Tobias Schandinat, kernel
In-Reply-To: <1369657985-11703-1-git-send-email-l.stach@pengutronix.de>
Hi,
On Monday 27 May 2013 14:33:05 Lucas Stach wrote:
> From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
>
> As the device_node pointer is not changed in of_get_display_timing and
> parse_timing_property it can be a const pointer.
>
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/video/of_display_timing.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/of_display_timing.c
> b/drivers/video/of_display_timing.c index 56009bc..85c1a41 100644
> --- a/drivers/video/of_display_timing.c
> +++ b/drivers/video/of_display_timing.c
> @@ -23,7 +23,7 @@
> * Every display_timing can be specified with either just the typical value
> or * a range consisting of min/typ/max. This function helps handling this
> **/
> -static int parse_timing_property(struct device_node *np, const char *name,
> +static int parse_timing_property(const struct device_node *np, const char
> *name, struct timing_entry *result)
> {
> struct property *prop;
> @@ -56,7 +56,8 @@ static int parse_timing_property(struct device_node *np,
> const char *name, * of_get_display_timing - parse display_timing entry from
> device_node * @np: device_node with the properties
> **/
> -static struct display_timing *of_get_display_timing(struct device_node *np)
> +static struct display_timing *of_get_display_timing(const struct
> device_node + *np)
> {
> struct display_timing *dt;
> u32 val = 0;
--
Regards,
Laurent Pinchart
^ permalink raw reply
* Re: [PATCH] PM: Add pm_sleep_ops_ptr() macro
From: Jingoo Han @ 2013-06-04 4:23 UTC (permalink / raw)
To: 'Rafael J. Wysocki'
Cc: 'Jean-Christophe PLAGNIOL-VILLARD',
'Lars-Peter Clausen', 'Michael Hennerich',
'Tomi Valkeinen', linux-fbdev, linux-pm, Jingoo Han
In-Reply-To: <3772829.L58vmUyOpk@vostro.rjw.lan>
On Tuesday, June 04, 2013 4:55 AM, Rafael J. Wysocki wrote:
> On Monday, June 03, 2013 01:11:07 PM Rafael J. Wysocki wrote:
> > On Monday, June 03, 2013 03:21:51 PM Jingoo Han wrote:
> > > Add pm_sleep_ops_ptr() macro that allows the .pm entry in the driver structures
> > > to be assigned without having an #define xxx NULL for the case that PM_SLEEP is
> > > not enabled.
> > >
> > > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> > > Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > > Cc: Lars-Peter Clausen <lars@metafoo.de>
> > > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> > > Cc: Michael Hennerich <michael.hennerich@analog.com>
> >
> > Do you want me to replace the previous patch with this?
>
> Quite frankly, I prefer the previous version, which was more general.
>
> That is, what if someone wants to use that macro for runtime PM too?
>
> Honestly, I think we'll be better off without any of them, so I'm dropping
> the previous patch too for now.
OK, I see.
I agree with your opinion.
Also, as I mentioned, I want other's better ideas.
Best regards,
Jingoo Han
>
> Thanks,
> Rafael
>
>
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply
* Re: linux-next: Tree for Jun 3 (fonts.c & vivi)
From: Geert Uytterhoeven @ 2013-06-04 6:50 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, Linux-Next, linux-kernel@vger.kernel.org,
linux-media, Linux Fbdev development list
In-Reply-To: <51AD053B.1040403@infradead.org>
On Mon, Jun 3, 2013 at 11:06 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
> On 06/03/13 13:54, Geert Uytterhoeven wrote:
>> On Mon, Jun 3, 2013 at 10:34 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
>>> On 06/02/13 23:37, Stephen Rothwell wrote:
>>>> Changes since 20130531:
>>> on x86_64:
>>>
>>> warning: (VIDEO_VIVI && USB_SISUSBVGA && SOLO6X10) selects FONT_SUPPORT which has unmet direct dependencies (HAS_IOMEM && VT)
>>> warning: (VIDEO_VIVI && FB_VGA16 && FB_S3 && FB_VT8623 && FB_ARK && USB_SISUSBVGA_CON && SOLO6X10) selects FONT_8x16 which has unmet direct dependencies (HAS_IOMEM && VT && FONT_SUPPORT)
>>
>> I knew about thet warning. But I thought it was harmless, as none of the font
>> code really depends on console support...
>>
>>> drivers/built-in.o: In function `vivi_init':
>>> vivi.c:(.init.text+0x1a3da): undefined reference to `find_font'
>>>
>>> when CONFIG_VT is not enabled.
>>
>> ... but I missed that drivers/video/console is not used if CONFIG_VT=y.
>> Sorry for that.
>>
>>> Just make CONFIG_VIDEO_VIVI depend on VT ?
>>
>> Does this (whitespace-damaged copy-and-paste) help?
>
> Yes, that works. Thanks.
>
> Acked-by: Randy Dunlap <rdunlap@infradead.org>
Thanks, I'll fold this into the original commit, which is destined for v3.10.
>> --- a/drivers/video/Makefile
>> +++ b/drivers/video/Makefile
>> @@ -12,7 +12,7 @@ fb-y := fbmem.o fbmon.o fbcmap.o
>> modedb.o fbcvt.o
>> fb-objs := $(fb-y)
>>
>> -obj-$(CONFIG_VT) += console/
>> +obj-y += console/
>> obj-$(CONFIG_LOGO) += logo/
>> obj-y += backlight/
>>
>> It shouldn't make a difference if nothing inside drivers/video/console
>> is enabled,
>> as all objects in drivers/video/console/Makefile are conditional.
>>
>> BTW, my plan was to move the font code to lib/font, but I haven't done that yet.
I'l try to do that for v3.11.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* Re: linux-next: fbdev-next inclusing
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-04 11:13 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20130531051325.GQ19468@game.jcrosoft.org>
On 16:35 Mon 03 Jun , Stephen Rothwell wrote:
> Hi,
>
> On Fri, 31 May 2013 07:13:25 +0200 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> wrote:
> >
> > Could you include the new fbdev -next in the linux-next please?
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/plagnioj/linux-fbdev.git for-next
>
> I have replaced Florian's tree with this one. Let me know if you want
> something different. Also, the contacts for this tree are now:
>
> Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
> linux-fbdev@vger.kernel.org
if Florian wish to continue to be in Cc keep but please add
Tomi Valkeinen <tomi.valkeinen@ti.com> too
Best Regards,
J.
^ permalink raw reply
* Re: linux-next: fbdev-next inclusing
From: Stephen Rothwell @ 2013-06-05 0:49 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20130531051325.GQ19468@game.jcrosoft.org>
[-- Attachment #1: Type: text/plain, Size: 311 bytes --]
Hi,
On Tue, 4 Jun 2013 13:13:44 +0200 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> wrote:
>
> if Florian wish to continue to be in Cc keep but please add
> Tomi Valkeinen <tomi.valkeinen@ti.com> too
Done. Florian?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox