* RE: [PATCH V2 1/5] include/video: Add samsung FIMD register header
From: Kukjin Kim @ 2012-08-01 2:10 UTC (permalink / raw)
To: 'Leela Krishna Amudala', linux-arm-kernel,
linux-samsung-soc
Cc: dri-devel, linux-fbdev, ben-linux, inki.dae, joshi, jg1.han,
m.szyprowski
In-Reply-To: <1343737385-23337-2-git-send-email-l.krishna@samsung.com>
Leela Krishna Amudala wrote:
>
> This patch copies the contents from regs-fb-v4.h and regs-fb.h to
> include/video/samsung_fimd.h
>
> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> ---
> include/video/samsung_fimd.h | 526
> ++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 526 insertions(+), 0 deletions(-)
> create mode 100644 include/video/samsung_fimd.h
>
Firstly, please check my comment on your previous patches.
And I don't see following definitions are needed and used now. If some
definitions are not needed, they can be removed.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply
* RE: [PATCH V2 2/5] include/video: Add Exynos5 specific FIMD register offsets
From: Kukjin Kim @ 2012-08-01 2:14 UTC (permalink / raw)
To: 'Leela Krishna Amudala', linux-arm-kernel,
linux-samsung-soc
Cc: dri-devel, linux-fbdev, ben-linux, inki.dae, joshi, jg1.han,
m.szyprowski
In-Reply-To: <1343737385-23337-3-git-send-email-l.krishna@samsung.com>
Leela Krishna Amudala wrote:
>
> Exynos5 has VIDTCON and VIDCON registers at different offsets
> from the previous SOCs. Hence, adding the macros.
>
> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> ---
> include/video/samsung_fimd.h | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/include/video/samsung_fimd.h b/include/video/samsung_fimd.h
> index e979f42..820f190 100644
> --- a/include/video/samsung_fimd.h
> +++ b/include/video/samsung_fimd.h
> @@ -524,3 +524,10 @@
> * 1110 -none- -none- -none- -none- -none-
> * 1111 -none- -none- -none- -none- -none-
> */
> +
> +/*EXYNOS5 FIMD REG OFFSET */
> +#define EXYNOS5_VIDTCON0 (0x20010)
> +#define EXYNOS5_VIDTCON1 (0x20014)
> +#define EXYNOS5_VIDTCON2 (0x20018)
> +#define EXYNOS5_VIDTCON3 (0x2001C)
> +#define EXYNOS5_VIDCON1 (0x20004)
> --
> 1.7.0.4
All of EXYNOS5 SoCs including upcoming SoCs _really_ have same address like
above?
I don't think so. You need to consider its flexibility or some compatibility
when definitions are added.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply
* Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences
From: Mitch Bradley @ 2012-08-01 2:15 UTC (permalink / raw)
To: Alex Courbot
Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mark Brown,
Stephen Warren, Greg Kroah-Hartman,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <50188ABB.2060304-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On 8/1/2012 9:47 AM, Alex Courbot wrote:
> On 07/31/2012 09:55 PM, Mitch Bradley wrote:
>> On 7/31/2012 8:38 PM, Thierry Reding wrote:
>>> On Tue, Jul 31, 2012 at 08:22:17PM +0800, Mitch Bradley wrote:
>>>> On 7/31/2012 6:56 PM, Thierry Reding wrote:
>>>>> On Tue, Jul 31, 2012 at 07:32:20PM +0900, Alex Courbot wrote:
>>>>>> On 07/31/2012 07:45 AM, Stephen Warren wrote:
>>>>>>> I wonder if using the same structure/array as input and output would
>>>>>>> simplify the API; the platform data would fill in the fields mentioned
>>>>>>> above, and power_seq_build() would parse those, then set other fields in
>>>>>>> the same structs to the looked-up handle values?
>>>>>>
>>>>>> The thing is that I am not sure what happens to the platform data
>>>>>> once probe() is done. Isn't it customary to mark it with __devinit
>>>>>> and have it freed after probing is successful?
>>>>>
>>>>> No, platform data should stay around forever. Otherwise, consider what
>>>>> would happen if your driver is built as a module and you unload and load
>>>>> it again.
>>>>>
>>>>>> More generally, I think it is a good practice to have data
>>>>>> structures tailored right for what they need to do - code with
>>>>>> members that are meaningful only at given points of an instance's
>>>>>> life tends to be more confusing.
>>>>>
>>>>> I agree. Furthermore the driver unload/reload would be another reason
>>>>> not to reuse platform data as the output of the build() function.
>>>>>
>>>>> But maybe what Stephen meant was more like filling a structure with data
>>>>> taken from the platform data and pass that to a resolve() function which
>>>>> would fill in the missing pieces like pointers to actual resources. I
>>>>> imagine a managed interface would become a little trickier to do using
>>>>> such an approach.
>>>>>
>>>>>>> If the nodes have a unit address (i.e. end in "@n"), which they will
>>>>>>> have to if all named "step" and there's more than one of them, then they
>>>>>>> will need a matching reg property. Equally, the parent node will need
>>>>>>> #address-cells and #size-cells too. So, the last couple lines would be:
>>>>>>>
>>>>>>> power-on-sequence {
>>>>>>> #address-cells = <1>;
>>>>>>> #size-cells = <0>;
>>>>>>> step@0 {
>>>>>>> reg = <0>;
>>>>>>
>>>>>> That's precisely what I would like to avoid - I don't need the steps
>>>>>> to be numbered and I certainly have no use for a reg property. Isn't
>>>>>> there a way to make it simpler?
>>>>>
>>>>> It's not technically valid to not have the reg property. Or
>>>>> #address-cells and #size-cells properties for that matter.
>>>>
>>>> I'm not keen on this representation where individual steps are nodes.
>>>> That seems like it could end up being too "heavyweight" for a long sequence.
>>>
>>> The other alternative would involve using a single property to encode
>>> one sequence. I think that was the initial proposal, though using proper
>>> phandle encoding it could probably be enhanced a bit. However anything
>>> that involves a single property has the problem that we need to encode
>>> the type of resource as an integer, and that makes things very hard to
>>> read.
>>>
>>> So it would look something like this:
>>>
>>> power-on = <1 &gpio 6 0 1
>>> 0 10000
>>> 2 ® 1
>>> 3 &pwm 0 5000000 1>;
>>>
>>> power-off = <3 &pwm 0 5000000 0
>>> 2 ® 0
>>> 0 10000
>>> 1 &gpio 6 0 0>;
>>>
>>> So the first cell would encode the type:
>>> 0: delay
>>> 1: gpio
>>> 2: regulator
>>> 3: PWM
>>>
>>> The next n cells would be the phandle and the specifier, while the last
>>> cell would encode a resource-specific parameter:
>>> delay: time in microseconds
>>> gpio: set level (0: low, 1: high)
>>> regulator: 0: disable, 1: enable
>>> pwm: 0: disable, 1: enable
>>>
>>> I guess this would be more compact, but it is also very hard to read. Is
>>> that something you would be happier with? Perhaps you were thinking of
>>> something completely different?
>>
>>
>> Perhaps a compact/flexible encoding could be designed, with a textual
>> encoding that is easy to read. A separate tool could convert the text
>> encoding to the integer format, annotated with comments containing
>> the "source text". A file containing that output could be #included
>> into the dts file.
>
> Do you mean having a external compiler that would run before dtc just
> for producing the power sequences? That sounds a little bit overkill for
> something that ough to remain simple.
>
> Also, although I admit I don't have the whole picture of where they
> could be used, I don't expect the power sequences to grow to sizes that
> would make us bother about their footprint.
It is axiomatic that every "language", if it succeeds at all, eventually
grows into a complete programming language. The more special-purpose
that it starts as, the uglier that it ends up.
>
> Alex.
>
^ permalink raw reply
* RE: [PATCH V2 3/5] arm: samsung: Include the modified FIMD header file
From: Kukjin Kim @ 2012-08-01 2:19 UTC (permalink / raw)
To: 'Leela Krishna Amudala', linux-arm-kernel,
linux-samsung-soc
Cc: dri-devel, linux-fbdev, ben-linux, inki.dae, joshi, jg1.han,
m.szyprowski
In-Reply-To: <1343737385-23337-4-git-send-email-l.krishna@samsung.com>
Leela Krishna Amudala wrote:
>
> The fimd register headers have been moved to include/video/
> hence, modifying the machine files accordingly.
>
> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> ---
> arch/arm/mach-exynos/mach-nuri.c | 2 +-
> arch/arm/mach-exynos/mach-origen.c | 2 +-
> arch/arm/mach-exynos/mach-smdk4x12.c | 2 +-
> arch/arm/mach-exynos/mach-smdkv310.c | 2 +-
> arch/arm/mach-exynos/mach-universal_c210.c | 2 +-
> arch/arm/mach-exynos/setup-fimd0.c | 2 +-
> arch/arm/mach-s3c24xx/mach-smdk2416.c | 2 +-
> arch/arm/mach-s3c64xx/mach-anw6410.c | 2 +-
> arch/arm/mach-s3c64xx/mach-crag6410.c | 2 +-
> arch/arm/mach-s3c64xx/mach-hmt.c | 2 +-
> arch/arm/mach-s3c64xx/mach-mini6410.c | 2 +-
> arch/arm/mach-s3c64xx/mach-ncp.c | 2 +-
> arch/arm/mach-s3c64xx/mach-real6410.c | 2 +-
> arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +-
> arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +-
> arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
> arch/arm/mach-s5p64x0/mach-smdk6440.c | 2 +-
> arch/arm/mach-s5p64x0/mach-smdk6450.c | 2 +-
> arch/arm/mach-s5pc100/mach-smdkc100.c | 2 +-
> arch/arm/mach-s5pv210/mach-aquila.c | 2 +-
> arch/arm/mach-s5pv210/mach-goni.c | 2 +-
> arch/arm/mach-s5pv210/mach-smdkv210.c | 2 +-
> 22 files changed, 22 insertions(+), 22 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-
> nuri.c
> index f98a83a..573a0c4 100644
> --- a/arch/arm/mach-exynos/mach-nuri.c
> +++ b/arch/arm/mach-exynos/mach-nuri.c
> @@ -39,7 +39,7 @@
> #include <asm/mach-types.h>
>
> #include <plat/adc.h>
> -#include <plat/regs-fb-v4.h>
> +#include <video/samsung_fimd.h>
> #include <plat/regs-serial.h>
> #include <plat/cpu.h>
> #include <plat/devs.h>
NO! Don't just replace it. Please put the inclusions with the same kind like
following.
diff --git a/arch/arm/mach-exynos/mach-nuri.c
b/arch/arm/mach-exynos/mach-nuri.c
index ea785fc..90d8daa 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -29,6 +29,7 @@
#include <drm/exynos_drm.h>
#include <video/platform_lcd.h>
+#include <video/samsung_fimd.h>
#include <media/m5mols.h>
#include <media/s5k6aa.h>
#include <media/s5p_fimc.h>
@@ -39,7 +40,6 @@
#include <asm/mach-types.h>
#include <plat/adc.h>
-#include <plat/regs-fb-v4.h>
#include <plat/regs-serial.h>
#include <plat/cpu.h>
#include <plat/devs.h>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply related
* RE: [PATCH V2 4/5] driver: Include the modified FIMD header file
From: Kukjin Kim @ 2012-08-01 2:20 UTC (permalink / raw)
To: 'Leela Krishna Amudala', linux-arm-kernel,
linux-samsung-soc
Cc: dri-devel, linux-fbdev, ben-linux, inki.dae, joshi, jg1.han,
m.szyprowski
In-Reply-To: <1343737385-23337-5-git-send-email-l.krishna@samsung.com>
Leela Krishna Amudala wrote:
>
> The fimd register headers have been moved to include/video/
> hence, modifying the driver files accordingly.
>
> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
> drivers/video/s3c-fb.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
[...]
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -26,7 +26,7 @@
> #include <linux/pm_runtime.h>
>
> #include <mach/map.h>
> -#include <plat/regs-fb-v4.h>
> +#include <video/samsung_fimd.h>
> #include <plat/fb.h>
>
See my previous comments.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply
* RE: [PATCH V2 0/5] arm: samsung: Move FIMD headers to include/video/
From: Kukjin Kim @ 2012-08-01 2:28 UTC (permalink / raw)
To: 'Leela Krishna Amudala', linux-arm-kernel,
linux-samsung-soc
Cc: dri-devel, linux-fbdev, ben-linux, inki.dae, joshi, jg1.han,
m.szyprowski, 'Florian Tobias Schandinat'
In-Reply-To: <1343737385-23337-1-git-send-email-l.krishna@samsung.com>
Leela Krishna Amudala wrote:
>
> This patchset moves the contents of regs-fb-v4.h and regs-fb.h from arch
> side
> to include/video/samsung_fimd.h
>
> This patchset is created and rebased against master branch of torvalds
> tree.
> Tested on smdk5250 board, build tested for other boards.
>
(Cc'ed Florian Tobias Schandinat)
Yeah, since it's merge window, this series could be created against on
mainline. And IMO, would be helpful to us if this series could be sent to
upstream via samsung tree after reviewing, because this touches too many
files in samsung tree and just adds include/video/samsung_fimd.h. But I'm
not sure the added inclusion will be used in other file of drivers/video. If
so, I can provide some topic branch can be merged into Florian's tree.
Florian, how about?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> Changes from version 1:
> - Split the patches as per Sylwester comments
> - Changed FIMD_V8_xxx macro to EXYNOS5_xxx
>
> Leela Krishna Amudala (5):
> include/video: Add samsung FIMD register header
> include/video: Add Exynos5 specific FIMD register offsets
> arm: samsung: Include the modified FIMD header file
> driver: Include the modified FIMD header file
> arm: samsung: delete frame buffer header files from platform
>
> arch/arm/mach-exynos/mach-nuri.c | 2 +-
> arch/arm/mach-exynos/mach-origen.c | 2 +-
> arch/arm/mach-exynos/mach-smdk4x12.c | 2 +-
> arch/arm/mach-exynos/mach-smdkv310.c | 2 +-
> arch/arm/mach-exynos/mach-universal_c210.c | 2 +-
> arch/arm/mach-exynos/setup-fimd0.c | 2 +-
> arch/arm/mach-s3c24xx/mach-smdk2416.c | 2 +-
> arch/arm/mach-s3c64xx/mach-anw6410.c | 2 +-
> arch/arm/mach-s3c64xx/mach-crag6410.c | 2 +-
> arch/arm/mach-s3c64xx/mach-hmt.c | 2 +-
> arch/arm/mach-s3c64xx/mach-mini6410.c | 2 +-
> arch/arm/mach-s3c64xx/mach-ncp.c | 2 +-
> arch/arm/mach-s3c64xx/mach-real6410.c | 2 +-
> arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +-
> arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +-
> arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
> arch/arm/mach-s5p64x0/mach-smdk6440.c | 2 +-
> arch/arm/mach-s5p64x0/mach-smdk6450.c | 2 +-
> arch/arm/mach-s5pc100/mach-smdkc100.c | 2 +-
> arch/arm/mach-s5pv210/mach-aquila.c | 2 +-
> arch/arm/mach-s5pv210/mach-goni.c | 2 +-
> arch/arm/mach-s5pv210/mach-smdkv210.c | 2 +-
> arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 159
----------------
> ----
> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
> drivers/video/s3c-fb.c | 2 +-
> .../plat/regs-fb.h => include/video/samsung_fimd.h | 152
> +++++++++++++++++--
> 26 files changed, 165 insertions(+), 194 deletions(-)
> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
> rename arch/arm/plat-samsung/include/plat/regs-fb.h =>
> include/video/samsung_fimd.h (74%)
^ permalink raw reply
* Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences
From: Alex Courbot @ 2012-08-01 2:50 UTC (permalink / raw)
To: Thierry Reding
Cc: Stephen Warren, Simon Glass, Grant Likely, Rob Herring,
Greg Kroah-Hartman, Mark Brown, Arnd Bergmann,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
In-Reply-To: <20120731101931.GB16155-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
On 07/31/2012 07:19 PM, Thierry Reding wrote:
> * PGP Signed by an unknown key
>
> On Tue, Jul 31, 2012 at 06:51:03PM +0900, Alex Courbot wrote:
>> On 07/30/2012 08:33 PM, Thierry Reding wrote:
>>>> +You will need an instance of power_seq_resources to keep track of the resources
>>>> +that are already allocated. On success, the function returns a devm allocated
>>>> +resolved sequence that is ready to be passed to power_seq_run(). In case of
>>>> +failure, and error code is returned.
>>>
>>> I don't quite understand why the struct power_seq_resources is needed.
>>> Can this not be stored within power_seq?
>>
>> power_seq_resources serves two purposes:
>> 1) When parsing sequences, it keeps track of the resources we have
>> already allocated to avoid getting the same resource twice
>> 2) On cleanup, it cleans the resources that needs to be freed (i.e.
>> those that are not devm-handled).
>>
>> 2) can certainly be removed either by enforcing use of devm, or by
>> doing reference counting. 1) seems more difficult to avoid - we need
>> to keep track of the resources we already own between calls to
>> power_seq_build(). I'd certainly be glad to remove that structure
>> from public view and simplify the code if that is possible though.
>
> I still don't see the problem. Managing the resources should be part of
> the power_seq core and shouldn't be visible to users. Maybe what you are
> worried about is that you may need the same resource both for a power-up
> and a power-down sequence? I can see how that would require a global
> list of resources.
Yes, that is precisely my concern. Sorry for not stating that more clearly.
> However I still think it would be easier to encapsulate that completely.
> Maybe another level of abstraction is required. You could for example
> add another type to encapsulate several power sequences and that could
> keep a list of used resources. I can't think of a good name, but maybe
> the following DT snippet clarifies what I mean:
>
> power-sequences {
> #address-cells = <1>;
> #size-cells = <0>;
>
> sequence@0 {
> name = "up";
>
> #address-cells = <1>;
> #size-cells = <0>;
>
> step@0 {
> ...
> };
>
> ...
> };
>
> sequence@1 {
> name = "down";
>
> #address-cells = <1>;
> #size-cells = <0>;
>
> step@0 {
> ...
> };
>
> ...
> };
> };
>
> If you add a name property like this, you could extend the API to
> support running a named sequence:
>
> power_seq_run(seq, "up");
> ...
> power_seq_run(seq, "down);
Mmm, that's something to consider. Forcing power sequences to be grouped
within a "power-sequences" node would also make parsing easier from the
driver side since it would not have to explicitly parse every sequence.
We could even imagine some tighter integration with the device subsystem
to automatically run specifically-named sequences during suspend/resume.
But maybe I'm thinking too much here.
>
>>> Also, is there some way we can make the id property for GPIOs not
>>> require the -gpio suffix? If the resource type is already GPIO, then it
>>> seems redundant to add -gpio to the ID.
>>
>> There is unfortunately an inconsistency between the way regulators
>> and GPIOs are gotten by name. regulator_get(id) will expect to find
>> a property named "id-supply", while gpio_request_one(id) expects a
>> property named exactly "id". To workaround this we could sprintf the
>> correct property name from a non-suffixed property name within the
>> driver, but I think this actually speaks more in favor of having
>> phandles directly into the sequences.
>
> Yes, if it can be made to work by specifying the phandle directly that
> is certainly better.
Let's do that then - as for the PWM issue I had, let's address that by
clearly stating in the documentation that phandles referring to a same
device *must* be identical.
>>>> + if (!seq) return 0;
>>>
>>> I don't think this is acceptable according to the coding style. Also,
>>> perhaps returning -EINVAL would be more meaningful?
>>
>> I neglected running checkpatch before submitting, apologies for
>> that. The return value seems correct to me, a NULL sequence has no
>> effect.
>
> But seq = NULL should never happen anyway, right?
It could if you are parsing a NULL node. It seems safe to me to consider
that a NULL sequence is an empty sequence, but if I go for your solution
involving another data structure to encapsulate the sequence, then this
might change.
>>> Perhaps this should check for POWER_SEQ_STOP instead?
>>
>> There is no resource for POWER_SEQ_STOP - therefore, a NULL resource
>> is used instead.
>
> Still, you use POWER_SEQ_STOP as an explicit sentinel to mark the end of
> a sequence, so intuitively I'd be looking for that as a stop condition.
That is for platform data - resolved sequences get their type from their
resource, and a STOP sequence does not have a resource. But the STOP
type will go away too since we will have a steps count in the platform
data instead.
>> I would like to do that actually. The issue is that it did not work
>> go well with the legacy pwm_backlight behavior: a power sequence
>> needs to be constructed out of a PWM obtained through
>> pwm_request(int pwm_id, char *label) and this behavior cannot be
>> emulated using the new platform data interface (which only works
>> with pwm_get()). But if I remove this old behavior, then I could
>> make power_seq opaque. I don't think many drivers are using it. What
>> do you think?
>
> I don't see how that is relevant here, since this power-sequencing code
> is supposed to be generic and not tied to any specific implementation.
> Can you explain further?
>
> In any case you shouldn't be using pwm_request() in new code.
Power sequences only rely on pwm_get, and never call pwm_request since
it is, as you stated, deprecated. However there are still boards that
use the old pwm_id member of the pwm_backlight_platform_data. For these,
we must call pwm_request from the pwm_backlight driver in order to
resolve the PWM (see pwm_backlight_legacy_probe of the seconds patch).
As the PWM is being resolved by the backlight driver, and not within the
power sequences parser, the resolved data structure must be visible to
pwm_backlight so it can construct it. There are two ways to solve this
and keep the power sequences structure private:
1) Add a way to resolve a PWM by id using pwm_request in the power
sequences (we probably should not do that)
2) Port the old platform pwm_request code to use pwm_add_table and
pwm_get instead.
Do I get points if I do 2)? :)
Thanks,
Alex.
^ permalink raw reply
* Re: [PATCH V2 5/5] arm: samsung: delete frame buffer header files from platform
From: Leela Krishna Amudala @ 2012-08-01 3:32 UTC (permalink / raw)
To: Kukjin Kim, Sylwester Nawrocki
Cc: linux-arm-kernel, linux-samsung-soc, dri-devel, linux-fbdev,
ben-linux, inki.dae, joshi, jg1.han, m.szyprowski
In-Reply-To: <02ee01cd6f89$f218b2c0$d64a1840$%kim@samsung.com>
Hello Kgene,
On Wed, Aug 1, 2012 at 7:34 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> Leela Krishna Amudala wrote:
>>
>> The FIMD register headers are moved to include/video/
>> hence, deleting these files from platform side
>>
>> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
>> ---
>> arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 159 ---------
>> arch/arm/plat-samsung/include/plat/regs-fb.h | 403
> -------------------
>> ----
>> 2 files changed, 0 insertions(+), 562 deletions(-)
>> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
>> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb.h
>>
> No. This should be squashed into first patch on this series. See below.
>
> arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 159
> --------------------
> .../plat/regs-fb.h => include/video/samsung_fimd.h | 145
> ++++++++++++++++--
> 2 files changed, 134 insertions(+), 170 deletions(-)
> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
> rename arch/arm/plat-samsung/include/plat/regs-fb.h =>
> include/video/samsung_fimd.h (74%)
>
If I squash it with the first patch and if somebody set that as a head
commit, it will break the build. Hence, splitted it up from the first
patch.
Thank you Sylwester for suggesting this split up change.
Regards,
Leela Krishna
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 5/5] drivers/video/exynos/exynos_dp_core.c: use devm_ functions
From: Sachin Kamat @ 2012-08-01 4:11 UTC (permalink / raw)
To: Jingoo Han
Cc: Damien Cassou, kernel-janitors, Florian Tobias Schandinat,
linux-fbdev, linux-kernel
In-Reply-To: <002c01cd6f73$4252b090$c6f811b0$%han@samsung.com>
On 1 August 2012 04:51, Jingoo Han <jg1.han@samsung.com> wrote:
> On Wednesday, August 01, 2012 1:39 AM Damien Cassou wrote:
>>
>> From: Damien Cassou <damien.cassou@lifl.fr>
>>
>> The various devm_ functions allocate memory that is released when a driver
>> detaches. This patch uses these functions for data that is allocated in
>> the probe function of a platform device and is only freed in the remove
>> function.
>>
>> Signed-off-by: Damien Cassou <damien.cassou@lifl.fr>
>>
>> ---
>> drivers/video/exynos/exynos_dp_core.c | 27 +++++++--------------------
>> 1 file changed, 7 insertions(+), 20 deletions(-)
>>
>> diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
>> index c6c016a..00fe4f0 100644
>> --- a/drivers/video/exynos/exynos_dp_core.c
>> +++ b/drivers/video/exynos/exynos_dp_core.c
>> @@ -872,7 +872,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>>
>> dp->dev = &pdev->dev;
>>
>> - dp->clock = clk_get(&pdev->dev, "dp");
>> + dp->clock = devm_clk_get(&pdev->dev, "dp");
>> if (IS_ERR(dp->clock)) {
>> dev_err(&pdev->dev, "failed to get clock\n");
>> return PTR_ERR(dp->clock);
>> @@ -881,31 +881,24 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>> clk_enable(dp->clock);
>>
>> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> - if (!res) {
>> - dev_err(&pdev->dev, "failed to get registers\n");
>> - ret = -EINVAL;
>> - goto err_clock;
>> - }
>
> Why do you remove this return check?
> If there is no reason, please, do it as follows:
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> if (!res) {
> dev_err(&pdev->dev, "failed to get registers\n");
> - ret = -EINVAL;
> - goto err_clock;
> + return -EINVAL;
> }
>
>
devm_request_and_ioremap function checks the validity of res. Hence
this check above is redundant and can be removed.
Damien,
This patch only adds devm_clk_get() function. Hence you could make the
subject line more specific.
> Best regards,
> Jingoo Han
>
>
>>
>> dp->reg_base = devm_request_and_ioremap(&pdev->dev, res);
>> if (!dp->reg_base) {
>> dev_err(&pdev->dev, "failed to ioremap\n");
>> - ret = -ENOMEM;
>> - goto err_clock;
>> + return -ENOMEM;
>> }
>>
>> dp->irq = platform_get_irq(pdev, 0);
>> if (!dp->irq) {
>> dev_err(&pdev->dev, "failed to get irq\n");
>> - ret = -ENODEV;
>> - goto err_clock;
>> + return -ENODEV;
>> }
>>
>> ret = devm_request_irq(&pdev->dev, dp->irq, exynos_dp_irq_handler, 0,
>> "exynos-dp", dp);
>> if (ret) {
>> dev_err(&pdev->dev, "failed to request irq\n");
>> - goto err_clock;
>> + return ret;
>> }
>>
>> dp->video_info = pdata->video_info;
>> @@ -917,7 +910,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>> ret = exynos_dp_detect_hpd(dp);
>> if (ret) {
>> dev_err(&pdev->dev, "unable to detect hpd\n");
>> - goto err_clock;
>> + return ret;
>> }
>>
>> exynos_dp_handle_edid(dp);
>> @@ -926,7 +919,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>> dp->video_info->link_rate);
>> if (ret) {
>> dev_err(&pdev->dev, "unable to do link train\n");
>> - goto err_clock;
>> + return ret;
>> }
>>
>> exynos_dp_enable_scramble(dp, 1);
>> @@ -940,17 +933,12 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>> ret = exynos_dp_config_video(dp, dp->video_info);
>> if (ret) {
>> dev_err(&pdev->dev, "unable to config video\n");
>> - goto err_clock;
>> + return ret;
>> }
>>
>> platform_set_drvdata(pdev, dp);
>>
>> return 0;
>> -
>> -err_clock:
>> - clk_put(dp->clock);
>> -
>> - return ret;
>> }
>>
>> static int __devexit exynos_dp_remove(struct platform_device *pdev)
>> @@ -962,7 +950,6 @@ static int __devexit exynos_dp_remove(struct platform_device *pdev)
>> pdata->phy_exit();
>>
>> clk_disable(dp->clock);
>> - clk_put(dp->clock);
>>
>> return 0;
>> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
With warm regards,
Sachin
^ permalink raw reply
* Re: [PATCH 5/5] drivers/video/exynos/exynos_dp_core.c: use devm_ functions
From: Jingoo Han @ 2012-08-01 4:30 UTC (permalink / raw)
To: 'Sachin Kamat'
Cc: 'Damien Cassou', kernel-janitors,
'Florian Tobias Schandinat', linux-fbdev, linux-kernel,
'Jingoo Han'
In-Reply-To: <CAK9yfHzje6NLqi5ixxA3J4aT1a9p6wJNJePzTi4xG9LN6AeLVw@mail.gmail.com>
On Wednesday, August 01, 2012 1:00 PMSachin Kamat wrote:
>
> On 1 August 2012 04:51, Jingoo Han <jg1.han@samsung.com> wrote:
> > On Wednesday, August 01, 2012 1:39 AM Damien Cassou wrote:
> >>
> >> From: Damien Cassou <damien.cassou@lifl.fr>
> >>
> >> The various devm_ functions allocate memory that is released when a driver
> >> detaches. This patch uses these functions for data that is allocated in
> >> the probe function of a platform device and is only freed in the remove
> >> function.
> >>
> >> Signed-off-by: Damien Cassou <damien.cassou@lifl.fr>
> >>
> >> ---
> >> drivers/video/exynos/exynos_dp_core.c | 27 +++++++--------------------
> >> 1 file changed, 7 insertions(+), 20 deletions(-)
> >>
> >> diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
> >> index c6c016a..00fe4f0 100644
> >> --- a/drivers/video/exynos/exynos_dp_core.c
> >> +++ b/drivers/video/exynos/exynos_dp_core.c
> >> @@ -872,7 +872,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >>
> >> dp->dev = &pdev->dev;
> >>
> >> - dp->clock = clk_get(&pdev->dev, "dp");
> >> + dp->clock = devm_clk_get(&pdev->dev, "dp");
> >> if (IS_ERR(dp->clock)) {
> >> dev_err(&pdev->dev, "failed to get clock\n");
> >> return PTR_ERR(dp->clock);
> >> @@ -881,31 +881,24 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> clk_enable(dp->clock);
> >>
> >> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >> - if (!res) {
> >> - dev_err(&pdev->dev, "failed to get registers\n");
> >> - ret = -EINVAL;
> >> - goto err_clock;
> >> - }
> >
> > Why do you remove this return check?
> > If there is no reason, please, do it as follows:
> >
> > res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > if (!res) {
> > dev_err(&pdev->dev, "failed to get registers\n");
> > - ret = -EINVAL;
> > - goto err_clock;
> > + return -EINVAL;
> > }
> >
> >
>
> devm_request_and_ioremap function checks the validity of res. Hence
> this check above is redundant and can be removed.
I don't think so.
Even though function called next checks the NULL value,
for robustness, the return value of platform_get_resource() should be
checked.
It is possible that devm_request_and_ioremap() can be changed in the future,
as request_mem_region() & ioremap() were changed to devm_request_and_ioremap().
Best regards,
Jingoo Han
>
> Damien,
> This patch only adds devm_clk_get() function. Hence you could make the
> subject line more specific.
>
>
>
>
> > Best regards,
> > Jingoo Han
> >
> >
> >>
> >> dp->reg_base = devm_request_and_ioremap(&pdev->dev, res);
> >> if (!dp->reg_base) {
> >> dev_err(&pdev->dev, "failed to ioremap\n");
> >> - ret = -ENOMEM;
> >> - goto err_clock;
> >> + return -ENOMEM;
> >> }
> >>
> >> dp->irq = platform_get_irq(pdev, 0);
> >> if (!dp->irq) {
> >> dev_err(&pdev->dev, "failed to get irq\n");
> >> - ret = -ENODEV;
> >> - goto err_clock;
> >> + return -ENODEV;
> >> }
> >>
> >> ret = devm_request_irq(&pdev->dev, dp->irq, exynos_dp_irq_handler, 0,
> >> "exynos-dp", dp);
> >> if (ret) {
> >> dev_err(&pdev->dev, "failed to request irq\n");
> >> - goto err_clock;
> >> + return ret;
> >> }
> >>
> >> dp->video_info = pdata->video_info;
> >> @@ -917,7 +910,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> ret = exynos_dp_detect_hpd(dp);
> >> if (ret) {
> >> dev_err(&pdev->dev, "unable to detect hpd\n");
> >> - goto err_clock;
> >> + return ret;
> >> }
> >>
> >> exynos_dp_handle_edid(dp);
> >> @@ -926,7 +919,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> dp->video_info->link_rate);
> >> if (ret) {
> >> dev_err(&pdev->dev, "unable to do link train\n");
> >> - goto err_clock;
> >> + return ret;
> >> }
> >>
> >> exynos_dp_enable_scramble(dp, 1);
> >> @@ -940,17 +933,12 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> ret = exynos_dp_config_video(dp, dp->video_info);
> >> if (ret) {
> >> dev_err(&pdev->dev, "unable to config video\n");
> >> - goto err_clock;
> >> + return ret;
> >> }
> >>
> >> platform_set_drvdata(pdev, dp);
> >>
> >> return 0;
> >> -
> >> -err_clock:
> >> - clk_put(dp->clock);
> >> -
> >> - return ret;
> >> }
> >>
> >> static int __devexit exynos_dp_remove(struct platform_device *pdev)
> >> @@ -962,7 +950,6 @@ static int __devexit exynos_dp_remove(struct platform_device *pdev)
> >> pdata->phy_exit();
> >>
> >> clk_disable(dp->clock);
> >> - clk_put(dp->clock);
> >>
> >> return 0;
> >> }
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
>
>
>
> --
> With warm regards,
> Sachin
^ permalink raw reply
* Re: [PATCH 5/5] drivers/video/exynos/exynos_dp_core.c: use devm_ functions
From: Sachin Kamat @ 2012-08-01 4:50 UTC (permalink / raw)
To: Jingoo Han
Cc: Damien Cassou, kernel-janitors, Florian Tobias Schandinat,
linux-fbdev, linux-kernel
In-Reply-To: <003e01cd6f9e$5a1146d0$0e33d470$%han@samsung.com>
On 1 August 2012 10:00, Jingoo Han <jg1.han@samsung.com> wrote:
> On Wednesday, August 01, 2012 1:00 PMSachin Kamat wrote:
>>
>> On 1 August 2012 04:51, Jingoo Han <jg1.han@samsung.com> wrote:
>> > On Wednesday, August 01, 2012 1:39 AM Damien Cassou wrote:
>> >>
>> >> From: Damien Cassou <damien.cassou@lifl.fr>
>> >>
>> >> The various devm_ functions allocate memory that is released when a driver
>> >> detaches. This patch uses these functions for data that is allocated in
>> >> the probe function of a platform device and is only freed in the remove
>> >> function.
>> >>
>> >> Signed-off-by: Damien Cassou <damien.cassou@lifl.fr>
>> >>
>> >> ---
>> >> drivers/video/exynos/exynos_dp_core.c | 27 +++++++--------------------
>> >> 1 file changed, 7 insertions(+), 20 deletions(-)
>> >>
>> >> diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
>> >> index c6c016a..00fe4f0 100644
>> >> --- a/drivers/video/exynos/exynos_dp_core.c
>> >> +++ b/drivers/video/exynos/exynos_dp_core.c
>> >> @@ -872,7 +872,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>> >>
>> >> dp->dev = &pdev->dev;
>> >>
>> >> - dp->clock = clk_get(&pdev->dev, "dp");
>> >> + dp->clock = devm_clk_get(&pdev->dev, "dp");
>> >> if (IS_ERR(dp->clock)) {
>> >> dev_err(&pdev->dev, "failed to get clock\n");
>> >> return PTR_ERR(dp->clock);
>> >> @@ -881,31 +881,24 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>> >> clk_enable(dp->clock);
>> >>
>> >> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> >> - if (!res) {
>> >> - dev_err(&pdev->dev, "failed to get registers\n");
>> >> - ret = -EINVAL;
>> >> - goto err_clock;
>> >> - }
>> >
>> > Why do you remove this return check?
>> > If there is no reason, please, do it as follows:
>> >
>> > res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> > if (!res) {
>> > dev_err(&pdev->dev, "failed to get registers\n");
>> > - ret = -EINVAL;
>> > - goto err_clock;
>> > + return -EINVAL;
>> > }
>> >
>> >
>>
>> devm_request_and_ioremap function checks the validity of res. Hence
>> this check above is redundant and can be removed.
>
>
> I don't think so.
> Even though function called next checks the NULL value,
> for robustness, the return value of platform_get_resource() should be
> checked.
>
> It is possible that devm_request_and_ioremap() can be changed in the future,
> as request_mem_region() & ioremap() were changed to devm_request_and_ioremap().
They are not changed. They still exist. devm_request_and_ioremap() is
an additional function provided for device managed resources.
>
>
> Best regards,
> Jingoo Han
>
>
>>
>> Damien,
>> This patch only adds devm_clk_get() function. Hence you could make the
>> subject line more specific.
>>
>>
>>
>>
>> > Best regards,
>> > Jingoo Han
>> >
>> >
>> >>
>> >> dp->reg_base = devm_request_and_ioremap(&pdev->dev, res);
>> >> if (!dp->reg_base) {
>> >> dev_err(&pdev->dev, "failed to ioremap\n");
>> >> - ret = -ENOMEM;
>> >> - goto err_clock;
>> >> + return -ENOMEM;
>> >> }
>> >>
>> >> dp->irq = platform_get_irq(pdev, 0);
>> >> if (!dp->irq) {
>> >> dev_err(&pdev->dev, "failed to get irq\n");
>> >> - ret = -ENODEV;
>> >> - goto err_clock;
>> >> + return -ENODEV;
>> >> }
>> >>
>> >> ret = devm_request_irq(&pdev->dev, dp->irq, exynos_dp_irq_handler, 0,
>> >> "exynos-dp", dp);
>> >> if (ret) {
>> >> dev_err(&pdev->dev, "failed to request irq\n");
>> >> - goto err_clock;
>> >> + return ret;
>> >> }
>> >>
>> >> dp->video_info = pdata->video_info;
>> >> @@ -917,7 +910,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>> >> ret = exynos_dp_detect_hpd(dp);
>> >> if (ret) {
>> >> dev_err(&pdev->dev, "unable to detect hpd\n");
>> >> - goto err_clock;
>> >> + return ret;
>> >> }
>> >>
>> >> exynos_dp_handle_edid(dp);
>> >> @@ -926,7 +919,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>> >> dp->video_info->link_rate);
>> >> if (ret) {
>> >> dev_err(&pdev->dev, "unable to do link train\n");
>> >> - goto err_clock;
>> >> + return ret;
>> >> }
>> >>
>> >> exynos_dp_enable_scramble(dp, 1);
>> >> @@ -940,17 +933,12 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>> >> ret = exynos_dp_config_video(dp, dp->video_info);
>> >> if (ret) {
>> >> dev_err(&pdev->dev, "unable to config video\n");
>> >> - goto err_clock;
>> >> + return ret;
>> >> }
>> >>
>> >> platform_set_drvdata(pdev, dp);
>> >>
>> >> return 0;
>> >> -
>> >> -err_clock:
>> >> - clk_put(dp->clock);
>> >> -
>> >> - return ret;
>> >> }
>> >>
>> >> static int __devexit exynos_dp_remove(struct platform_device *pdev)
>> >> @@ -962,7 +950,6 @@ static int __devexit exynos_dp_remove(struct platform_device *pdev)
>> >> pdata->phy_exit();
>> >>
>> >> clk_disable(dp->clock);
>> >> - clk_put(dp->clock);
>> >>
>> >> return 0;
>> >> }
>> >
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> > the body of a message to majordomo@vger.kernel.org
>> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>> > Please read the FAQ at http://www.tux.org/lkml/
>>
>>
>>
>> --
>> With warm regards,
>> Sachin
>
--
With warm regards,
Sachin
^ permalink raw reply
* RE: [PATCH 5/5] drivers/video/exynos/exynos_dp_core.c: use devm_ functions
From: Jingoo Han @ 2012-08-01 4:57 UTC (permalink / raw)
To: 'Sachin Kamat'
Cc: 'Damien Cassou', kernel-janitors,
'Florian Tobias Schandinat', linux-fbdev, linux-kernel,
'Jingoo Han'
In-Reply-To: <CAK9yfHyvHEPQRFvuX6q5CZEEN_6xeTqWvitdtayib6W8t0qCWw@mail.gmail.com>
On Wednesday, August 01, 2012 1:38 PM Sachin Kamat wrote:
>
> On 1 August 2012 10:00, Jingoo Han <jg1.han@samsung.com> wrote:
> > On Wednesday, August 01, 2012 1:00 PMSachin Kamat wrote:
> >>
> >> On 1 August 2012 04:51, Jingoo Han <jg1.han@samsung.com> wrote:
> >> > On Wednesday, August 01, 2012 1:39 AM Damien Cassou wrote:
> >> >>
> >> >> From: Damien Cassou <damien.cassou@lifl.fr>
> >> >>
> >> >> The various devm_ functions allocate memory that is released when a driver
> >> >> detaches. This patch uses these functions for data that is allocated in
> >> >> the probe function of a platform device and is only freed in the remove
> >> >> function.
> >> >>
> >> >> Signed-off-by: Damien Cassou <damien.cassou@lifl.fr>
> >> >>
> >> >> ---
> >> >> drivers/video/exynos/exynos_dp_core.c | 27 +++++++--------------------
> >> >> 1 file changed, 7 insertions(+), 20 deletions(-)
> >> >>
> >> >> diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
> >> >> index c6c016a..00fe4f0 100644
> >> >> --- a/drivers/video/exynos/exynos_dp_core.c
> >> >> +++ b/drivers/video/exynos/exynos_dp_core.c
> >> >> @@ -872,7 +872,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> >>
> >> >> dp->dev = &pdev->dev;
> >> >>
> >> >> - dp->clock = clk_get(&pdev->dev, "dp");
> >> >> + dp->clock = devm_clk_get(&pdev->dev, "dp");
> >> >> if (IS_ERR(dp->clock)) {
> >> >> dev_err(&pdev->dev, "failed to get clock\n");
> >> >> return PTR_ERR(dp->clock);
> >> >> @@ -881,31 +881,24 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> >> clk_enable(dp->clock);
> >> >>
> >> >> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >> >> - if (!res) {
> >> >> - dev_err(&pdev->dev, "failed to get registers\n");
> >> >> - ret = -EINVAL;
> >> >> - goto err_clock;
> >> >> - }
> >> >
> >> > Why do you remove this return check?
> >> > If there is no reason, please, do it as follows:
> >> >
> >> > res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >> > if (!res) {
> >> > dev_err(&pdev->dev, "failed to get registers\n");
> >> > - ret = -EINVAL;
> >> > - goto err_clock;
> >> > + return -EINVAL;
> >> > }
> >> >
> >> >
> >>
> >> devm_request_and_ioremap function checks the validity of res. Hence
> >> this check above is redundant and can be removed.
> >
> >
> > I don't think so.
> > Even though function called next checks the NULL value,
> > for robustness, the return value of platform_get_resource() should be
> > checked.
> >
> > It is possible that devm_request_and_ioremap() can be changed in the future,
> > as request_mem_region() & ioremap() were changed to devm_request_and_ioremap().
>
> They are not changed. They still exist. devm_request_and_ioremap() is
> an additional function provided for device managed resources.
OK, I see. I accept it.
Anyway it is simpler.
>
>
> >
> >
> > Best regards,
> > Jingoo Han
> >
> >
> >>
> >> Damien,
> >> This patch only adds devm_clk_get() function. Hence you could make the
> >> subject line more specific.
> >>
> >>
> >>
> >>
> >> > Best regards,
> >> > Jingoo Han
> >> >
> >> >
> >> >>
> >> >> dp->reg_base = devm_request_and_ioremap(&pdev->dev, res);
> >> >> if (!dp->reg_base) {
> >> >> dev_err(&pdev->dev, "failed to ioremap\n");
> >> >> - ret = -ENOMEM;
> >> >> - goto err_clock;
> >> >> + return -ENOMEM;
> >> >> }
> >> >>
> >> >> dp->irq = platform_get_irq(pdev, 0);
> >> >> if (!dp->irq) {
> >> >> dev_err(&pdev->dev, "failed to get irq\n");
> >> >> - ret = -ENODEV;
> >> >> - goto err_clock;
> >> >> + return -ENODEV;
> >> >> }
> >> >>
> >> >> ret = devm_request_irq(&pdev->dev, dp->irq, exynos_dp_irq_handler, 0,
> >> >> "exynos-dp", dp);
> >> >> if (ret) {
> >> >> dev_err(&pdev->dev, "failed to request irq\n");
> >> >> - goto err_clock;
> >> >> + return ret;
> >> >> }
> >> >>
> >> >> dp->video_info = pdata->video_info;
> >> >> @@ -917,7 +910,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> >> ret = exynos_dp_detect_hpd(dp);
> >> >> if (ret) {
> >> >> dev_err(&pdev->dev, "unable to detect hpd\n");
> >> >> - goto err_clock;
> >> >> + return ret;
> >> >> }
> >> >>
> >> >> exynos_dp_handle_edid(dp);
> >> >> @@ -926,7 +919,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> >> dp->video_info->link_rate);
> >> >> if (ret) {
> >> >> dev_err(&pdev->dev, "unable to do link train\n");
> >> >> - goto err_clock;
> >> >> + return ret;
> >> >> }
> >> >>
> >> >> exynos_dp_enable_scramble(dp, 1);
> >> >> @@ -940,17 +933,12 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> >> ret = exynos_dp_config_video(dp, dp->video_info);
> >> >> if (ret) {
> >> >> dev_err(&pdev->dev, "unable to config video\n");
> >> >> - goto err_clock;
> >> >> + return ret;
> >> >> }
> >> >>
> >> >> platform_set_drvdata(pdev, dp);
> >> >>
> >> >> return 0;
> >> >> -
> >> >> -err_clock:
> >> >> - clk_put(dp->clock);
> >> >> -
> >> >> - return ret;
> >> >> }
> >> >>
> >> >> static int __devexit exynos_dp_remove(struct platform_device *pdev)
> >> >> @@ -962,7 +950,6 @@ static int __devexit exynos_dp_remove(struct platform_device *pdev)
> >> >> pdata->phy_exit();
> >> >>
> >> >> clk_disable(dp->clock);
> >> >> - clk_put(dp->clock);
> >> >>
> >> >> return 0;
> >> >> }
> >> >
> >> > --
> >> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> >> > the body of a message to majordomo@vger.kernel.org
> >> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >> > Please read the FAQ at http://www.tux.org/lkml/
> >>
> >>
> >>
> >> --
> >> With warm regards,
> >> Sachin
> >
>
>
>
> --
> With warm regards,
> Sachin
^ permalink raw reply
* RE: [PATCH 5/5] drivers/video/exynos/exynos_dp_core.c: use devm_ functions
From: Jingoo Han @ 2012-08-01 5:08 UTC (permalink / raw)
To: 'Damien Cassou', 'Sachin Kamat'
Cc: kernel-janitors, 'Florian Tobias Schandinat', linux-fbdev,
linux-kernel, 'Jingoo Han'
In-Reply-To: <CAK9yfHzje6NLqi5ixxA3J4aT1a9p6wJNJePzTi4xG9LN6AeLVw@mail.gmail.com>
On Wednesday, August 01, 2012 1:00 PM Sachin Kamat wrote:
>
> On 1 August 2012 04:51, Jingoo Han <jg1.han@samsung.com> wrote:
> > On Wednesday, August 01, 2012 1:39 AM Damien Cassou wrote:
> >>
> >> From: Damien Cassou <damien.cassou@lifl.fr>
> >>
> >> The various devm_ functions allocate memory that is released when a driver
> >> detaches. This patch uses these functions for data that is allocated in
> >> the probe function of a platform device and is only freed in the remove
> >> function.
> >>
> >> Signed-off-by: Damien Cassou <damien.cassou@lifl.fr>
> >>
> >> ---
> >> drivers/video/exynos/exynos_dp_core.c | 27 +++++++--------------------
> >> 1 file changed, 7 insertions(+), 20 deletions(-)
> >>
> >> diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
> >> index c6c016a..00fe4f0 100644
> >> --- a/drivers/video/exynos/exynos_dp_core.c
> >> +++ b/drivers/video/exynos/exynos_dp_core.c
> >> @@ -872,7 +872,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >>
> >> dp->dev = &pdev->dev;
> >>
> >> - dp->clock = clk_get(&pdev->dev, "dp");
> >> + dp->clock = devm_clk_get(&pdev->dev, "dp");
> >> if (IS_ERR(dp->clock)) {
> >> dev_err(&pdev->dev, "failed to get clock\n");
> >> return PTR_ERR(dp->clock);
> >> @@ -881,31 +881,24 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> clk_enable(dp->clock);
> >>
> >> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >> - if (!res) {
> >> - dev_err(&pdev->dev, "failed to get registers\n");
> >> - ret = -EINVAL;
> >> - goto err_clock;
> >> - }
> >
> > Why do you remove this return check?
> > If there is no reason, please, do it as follows:
> >
> > res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > if (!res) {
> > dev_err(&pdev->dev, "failed to get registers\n");
> > - ret = -EINVAL;
> > - goto err_clock;
> > + return -EINVAL;
> > }
> >
> >
>
> devm_request_and_ioremap function checks the validity of res. Hence
> this check above is redundant and can be removed.
>
> Damien,
> This patch only adds devm_clk_get() function. Hence you could make the
> subject line more specific.
To Damien,
As Sachin Kamat mentioned, please change the subject more specific. For example,
video: exynos_dp: use devm_clk_get function
Best regards,
Jingoo Han
>
>
>
>
> > Best regards,
> > Jingoo Han
> >
> >
> >>
> >> dp->reg_base = devm_request_and_ioremap(&pdev->dev, res);
> >> if (!dp->reg_base) {
> >> dev_err(&pdev->dev, "failed to ioremap\n");
> >> - ret = -ENOMEM;
> >> - goto err_clock;
> >> + return -ENOMEM;
> >> }
> >>
> >> dp->irq = platform_get_irq(pdev, 0);
> >> if (!dp->irq) {
> >> dev_err(&pdev->dev, "failed to get irq\n");
> >> - ret = -ENODEV;
> >> - goto err_clock;
> >> + return -ENODEV;
> >> }
> >>
> >> ret = devm_request_irq(&pdev->dev, dp->irq, exynos_dp_irq_handler, 0,
> >> "exynos-dp", dp);
> >> if (ret) {
> >> dev_err(&pdev->dev, "failed to request irq\n");
> >> - goto err_clock;
> >> + return ret;
> >> }
> >>
> >> dp->video_info = pdata->video_info;
> >> @@ -917,7 +910,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> ret = exynos_dp_detect_hpd(dp);
> >> if (ret) {
> >> dev_err(&pdev->dev, "unable to detect hpd\n");
> >> - goto err_clock;
> >> + return ret;
> >> }
> >>
> >> exynos_dp_handle_edid(dp);
> >> @@ -926,7 +919,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> dp->video_info->link_rate);
> >> if (ret) {
> >> dev_err(&pdev->dev, "unable to do link train\n");
> >> - goto err_clock;
> >> + return ret;
> >> }
> >>
> >> exynos_dp_enable_scramble(dp, 1);
> >> @@ -940,17 +933,12 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
> >> ret = exynos_dp_config_video(dp, dp->video_info);
> >> if (ret) {
> >> dev_err(&pdev->dev, "unable to config video\n");
> >> - goto err_clock;
> >> + return ret;
> >> }
> >>
> >> platform_set_drvdata(pdev, dp);
> >>
> >> return 0;
> >> -
> >> -err_clock:
> >> - clk_put(dp->clock);
> >> -
> >> - return ret;
> >> }
> >>
> >> static int __devexit exynos_dp_remove(struct platform_device *pdev)
> >> @@ -962,7 +950,6 @@ static int __devexit exynos_dp_remove(struct platform_device *pdev)
> >> pdata->phy_exit();
> >>
> >> clk_disable(dp->clock);
> >> - clk_put(dp->clock);
> >>
> >> return 0;
> >> }
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
>
>
>
> --
> With warm regards,
> Sachin
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* RE: [PATCH 5/5] drivers/video/exynos/exynos_dp_core.c: use devm_ functions
From: Julia Lawall @ 2012-08-01 5:13 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Sachin Kamat', 'Damien Cassou', kernel-janitors,
'Florian Tobias Schandinat', linux-fbdev, linux-kernel
In-Reply-To: <003f01cd6fa2$36463bd0$a2d2b370$%han@samsung.com>
On Wed, 1 Aug 2012, Jingoo Han wrote:
> On Wednesday, August 01, 2012 1:38 PM Sachin Kamat wrote:
>>
>> On 1 August 2012 10:00, Jingoo Han <jg1.han@samsung.com> wrote:
>>> On Wednesday, August 01, 2012 1:00 PMSachin Kamat wrote:
>>>>
>>>> On 1 August 2012 04:51, Jingoo Han <jg1.han@samsung.com> wrote:
>>>>> On Wednesday, August 01, 2012 1:39 AM Damien Cassou wrote:
>>>>>>
>>>>>> From: Damien Cassou <damien.cassou@lifl.fr>
>>>>>>
>>>>>> The various devm_ functions allocate memory that is released when a driver
>>>>>> detaches. This patch uses these functions for data that is allocated in
>>>>>> the probe function of a platform device and is only freed in the remove
>>>>>> function.
>>>>>>
>>>>>> Signed-off-by: Damien Cassou <damien.cassou@lifl.fr>
>>>>>>
>>>>>> ---
>>>>>> drivers/video/exynos/exynos_dp_core.c | 27 +++++++--------------------
>>>>>> 1 file changed, 7 insertions(+), 20 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
>>>>>> index c6c016a..00fe4f0 100644
>>>>>> --- a/drivers/video/exynos/exynos_dp_core.c
>>>>>> +++ b/drivers/video/exynos/exynos_dp_core.c
>>>>>> @@ -872,7 +872,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>>>>>>
>>>>>> dp->dev = &pdev->dev;
>>>>>>
>>>>>> - dp->clock = clk_get(&pdev->dev, "dp");
>>>>>> + dp->clock = devm_clk_get(&pdev->dev, "dp");
>>>>>> if (IS_ERR(dp->clock)) {
>>>>>> dev_err(&pdev->dev, "failed to get clock\n");
>>>>>> return PTR_ERR(dp->clock);
>>>>>> @@ -881,31 +881,24 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev)
>>>>>> clk_enable(dp->clock);
>>>>>>
>>>>>> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>>>>> - if (!res) {
>>>>>> - dev_err(&pdev->dev, "failed to get registers\n");
>>>>>> - ret = -EINVAL;
>>>>>> - goto err_clock;
>>>>>> - }
>>>>>
>>>>> Why do you remove this return check?
>>>>> If there is no reason, please, do it as follows:
>>>>>
>>>>> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>>>> if (!res) {
>>>>> dev_err(&pdev->dev, "failed to get registers\n");
>>>>> - ret = -EINVAL;
>>>>> - goto err_clock;
>>>>> + return -EINVAL;
>>>>> }
>>>>>
>>>>>
>>>>
>>>> devm_request_and_ioremap function checks the validity of res. Hence
>>>> this check above is redundant and can be removed.
>>>
>>>
>>> I don't think so.
>>> Even though function called next checks the NULL value,
>>> for robustness, the return value of platform_get_resource() should be
>>> checked.
>>>
>>> It is possible that devm_request_and_ioremap() can be changed in the future,
>>> as request_mem_region() & ioremap() were changed to devm_request_and_ioremap().
>>
>> They are not changed. They still exist. devm_request_and_ioremap() is
>> an additional function provided for device managed resources.
>
>
> OK, I see. I accept it.
> Anyway it is simpler.
This thread contains a discussion about the issue
http://lkml.org/lkml/2012/1/28/10
Look for the comments by Wolfram Sang, who
implemented devm_request_and_ioremap, and who suggests that the NULL test
be removed.
I rather agree with the desire to be safe and uniform, but these
initialization functions are really large, and with error handling code
(although not in this case) there is always the danger of jumping to the
wrong place, and thus making more of a mess. It would be nice if the
platform_get_resource could be merged with devm_request_and_ioremap, but I
think that I looked once and there were not enough calls that were similar
enough to make that compelling.
julia
^ permalink raw reply
* Re: [PATCH 1/4] video: Add support for the Solomon SSD1307 OLED Controller
From: Shawn Guo @ 2012-08-01 5:24 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1343730576-20494-2-git-send-email-maxime.ripard@free-electrons.com>
On Tue, Jul 31, 2012 at 12:29:33PM +0200, Maxime Ripard wrote:
> +Optional properties:
> + - oled-reset-active-low: Is the reset gpio is active on physical low?
You may want to take a look at commit c1cb438 (bindings: update imx and
mxs #gpio-cells) which got merged recently. In case the driver will
only work on mxs, this optional property can just be dropped.
Regards,
Shawn
^ permalink raw reply
* Re: [PATCH 1/4] video: Add support for the Solomon SSD1307 OLED Controller
From: Jingoo Han @ 2012-08-01 5:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1343730576-20494-2-git-send-email-maxime.ripard@free-electrons.com>
On Tuesday, July 31, 2012 7:30 PM Maxime Ripard wrote:
>
> This patch adds support for the Solomon SSD1307 OLED
> controller found on the Crystalfontz CFA10036 board.
>
> This controller can drive a display with a resolution up
> to 128x39 and can operate over I2C or SPI.
>
> The current driver has only been tested on the CFA-10036,
> that is using this controller over I2C to driver a 96x16
> OLED screen.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Brian Lilly <brian@crystalfontz.com>
> ---
> .../devicetree/bindings/video/ssd1307fb.txt | 24 ++
> drivers/video/Kconfig | 14 +
> drivers/video/Makefile | 1 +
> drivers/video/ssd1307fb.c | 418 ++++++++++++++++++++
> 4 files changed, 457 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/video/ssd1307fb.txt
> create mode 100644 drivers/video/ssd1307fb.c
>
> diff --git a/Documentation/devicetree/bindings/video/ssd1307fb.txt
> b/Documentation/devicetree/bindings/video/ssd1307fb.txt
> new file mode 100644
> index 0000000..791e14f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/video/ssd1307fb.txt
> @@ -0,0 +1,24 @@
> +* Solomon SSD1307 Framebuffer Driver
> +
> +Required properties:
> + - compatible: Should be "solomon,ssd1307fb-<bus>". The only supported bus for
> + now is i2c.
> + - reg: Should contain address of the controller on the I2C bus. Most likely
> + 0x3c or 0x3d
> + - pwm: Should contain the pwm to use according to the OF device tree PWM
> + specification [0]
> + - oled-reset-gpio: Should contain the GPIO used to reset the OLED display
> +
> +Optional properties:
> + - oled-reset-active-low: Is the reset gpio is active on physical low?
> +
> +[0]: Documentation/devicetree/bindings/pwm/pwm.txt
> +
> +Examples:
> +ssd1307: oled@3c {
> + compatible = "solomon,ssd1307fb-i2c";
> + reg = <0x3c>;
> + pwms = <&pwm 4 3000>;
> + oled-reset-gpio = <&gpio2 7 1>;
> + oled-reset-active-low;
> +};
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 0217f74..21ae6dd 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -2469,4 +2469,18 @@ config FB_SH_MOBILE_MERAM
> Up to 4 memory channels can be configured, allowing 4 RGB or
> 2 YCbCr framebuffers to be configured.
>
> +
Please remove redundant line.
> +config FB_SSD1307
> + tristate "Solomon SSD1307 framebuffer support"
> + depends on FB && I2C
> + select FB_SYS_FOPS
> + select FB_SYS_FILLRECT
> + select FB_SYS_COPYAREA
> + select FB_SYS_IMAGEBLIT
> + select FB_DEFERRED_IO
> + select PWM
> + help
> + This driver implements support for the Solomon SSD1307
> + OLED controller over I2C.
> +
> endmenu
> diff --git a/drivers/video/Makefile b/drivers/video/Makefile
> index ee8dafb..6bbb72c 100644
> --- a/drivers/video/Makefile
> +++ b/drivers/video/Makefile
> @@ -164,6 +164,7 @@ obj-$(CONFIG_FB_BFIN_7393) += bfin_adv7393fb.o
> obj-$(CONFIG_FB_MX3) += mx3fb.o
> obj-$(CONFIG_FB_DA8XX) += da8xx-fb.o
> obj-$(CONFIG_FB_MXS) += mxsfb.o
> +obj-$(CONFIG_FB_SSD1307) += ssd1307fb.o
>
> # the test framebuffer is last
> obj-$(CONFIG_FB_VIRTUAL) += vfb.o
> diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c
> new file mode 100644
> index 0000000..c705ab4
> --- /dev/null
> +++ b/drivers/video/ssd1307fb.c
> @@ -0,0 +1,418 @@
> +/*
> + * Driver for the Solomon SSD1307 OLED controler
> + *
> + * Copyright 2012 Free Electrons
> + *
> + * Licensed under the GPLv2 or later.
> + */
> +
> +#include <linux/module.h>
> +#include <linux/kernel.h>
> +#include <linux/i2c.h>
> +#include <linux/fb.h>
> +#include <linux/uaccess.h>
> +#include <linux/of_device.h>
> +#include <linux/of_gpio.h>
> +#include <linux/pwm.h>
> +#include <linux/delay.h>
> +
> +#define SSD1307FB_WIDTH 96
> +#define SSD1307FB_HEIGHT 16
> +
> +#define SSD1307FB_DATA 0x40
> +#define SSD1307FB_COMMAND 0x80
> +
> +#define SSD1307FB_CONTRAST 0x81
> +#define SSD1307FB_SEG_REMAP_ON 0xa1
> +#define SSD1307FB_DISPLAY_OFF 0xae
> +#define SSD1307FB_DISPLAY_ON 0xaf
> +#define SSD1307FB_START_PAGE_ADDRESS 0xb0
> +
> +struct ssd1307fb_par {
> + struct i2c_client *client;
> + struct fb_info *info;
> + struct pwm_device *pwm;
> + u32 pwm_period;
> + int reset;
> +};
> +
> +static struct fb_fix_screeninfo ssd1307fb_fix __devinitdata = {
> + .id = "Solomon SSD1307",
> + .type = FB_TYPE_PACKED_PIXELS,
> + .visual = FB_VISUAL_MONO10,
> + .xpanstep = 0,
> + .ypanstep = 0,
> + .ywrapstep = 0,
> + .line_length = SSD1307FB_WIDTH / 8,
> + .accel = FB_ACCEL_NONE,
> +};
> +
> +static struct fb_var_screeninfo ssd1307fb_var __devinitdata = {
> + .xres = SSD1307FB_WIDTH,
> + .yres = SSD1307FB_HEIGHT,
> + .xres_virtual = SSD1307FB_WIDTH,
> + .yres_virtual = SSD1307FB_HEIGHT,
> + .bits_per_pixel = 1,
> +};
> +
> +static int ssd1307fb_write_array(struct i2c_client *client, u8 type, u8* cmd, u32 len)
> +{
> + u8 *buf;
> + int ret = 0;
> +
> + buf = kzalloc(len + 1, GFP_KERNEL);
> + if (!buf) {
> + dev_err(&client->dev, "Couldn't allocate sending buffer.\n");
> + ret = -ENOMEM;
> + goto out;
> + }
How about using returning - ENOMEM without goto.
It is simpler.
if (!buf) {
dev_err(&client->dev, "Couldn't allocate sending buffer.\n");
return -ENOMEM;
}
> +
> + buf[0] = type;
> + memcpy(buf + 1, cmd, len);
> +
> + ret = i2c_master_send(client, buf, len + 1);
> + if (ret != len + 1) {
> + dev_err(&client->dev, "Couldn't send I2C command.\n");
> + goto error;
> + }
> +
> +error:
> + kfree(buf);
> +out:
> + return ret;
Please refer to above comment.
If goto out is not used, it would be simpler.
+error:
+ kfree(buf);
+ return ret;
> +}
> +
> +static inline int ssd1307fb_write_cmd_array(struct i2c_client *client, u8* cmd, u32 len)
> +{
> + return ssd1307fb_write_array(client, SSD1307FB_COMMAND, cmd, len);
> +}
> +
> +static inline int ssd1307fb_write_cmd(struct i2c_client *client, u8 cmd)
> +{
> + return ssd1307fb_write_cmd_array(client, &cmd, 1);
> +}
> +
> +static inline int ssd1307fb_write_data_array(struct i2c_client *client, u8* cmd, u32 len)
> +{
> + return ssd1307fb_write_array(client, SSD1307FB_DATA, cmd, len);
> +}
> +
> +static inline int ssd1307fb_write_data(struct i2c_client *client, u8 data)
> +{
> + return ssd1307fb_write_data_array(client, &data, 1);
> +}
> +
> +static int ssd1307fb_set(struct i2c_client *client, u8 value)
> +{
> + int i, j, ret;
> +
> + for (i = 1; i <= (SSD1307FB_HEIGHT / 8); i++) {
> + ret = ssd1307fb_write_cmd(client, SSD1307FB_START_PAGE_ADDRESS + i);
> + if (ret < 0)
> + goto i2c_error;
> +
> + ret = ssd1307fb_write_cmd(client, 0x00);
> + if (ret < 0)
> + goto i2c_error;
> +
> + ret = ssd1307fb_write_cmd(client, 0x10);
> + if (ret < 0)
> + goto i2c_error;
> +
> + for (j = 0; j < SSD1307FB_WIDTH; j++)
> + ssd1307fb_write_data(client, value);
> + }
> +
> + return 0;
> +
> +i2c_error:
> + dev_err(&client->dev, "Couldn't send i2c command: %d\n", ret);
> + return ret;
> +}
> +
> +static void ssd1307fb_update_display(struct ssd1307fb_par *par)
> +{
> + u8 *vmem = par->info->screen_base;
> + int i, j, k;
> +
> + /*
> + * The screen is divided in pages, each having a height of 8
> + * pixels, and the width of the screen. When sending a byte of
> + * data to the controller, it gives the 8 bits for the current
> + * column. I.e, the first byte are the 8 bits of the first
> + * column, then the 8 bits for the second column, etc.
> + *
> + *
> + * Representation of the screen, assuming it is 5 bits
> + * wide. Each letter-number combination is a bit that controls
> + * one pixel.
> + *
> + * A0 A1 A2 A3 A4
> + * B0 B1 B2 B3 B4
> + * C0 C1 C2 C3 C4
> + * D0 D1 D2 D3 D4
> + * E0 E1 E2 E3 E4
> + * F0 F1 F2 F3 F4
> + * G0 G1 G2 G3 G4
> + * H0 H1 H2 H3 H4
> + *
> + * If you want to update this screen, you need to send 5 bytes:
> + * (1) A0 B0 C0 D0 E0 F0 G0 H0
> + * (2) A1 B1 C1 D1 E1 F1 G1 H1
> + * (3) A2 B2 C2 D2 E2 F2 G2 H2
> + * (4) A3 B3 C3 D3 E3 F3 G3 H3
> + * (5) A4 B4 C4 D4 E4 F4 G4 H4
> + */
> +
> + for (i = 0; i < (SSD1307FB_HEIGHT / 8); i++) {
> + ssd1307fb_write_cmd(par->client, SSD1307FB_START_PAGE_ADDRESS + (i + 1));
> + ssd1307fb_write_cmd(par->client, 0x00);
> + ssd1307fb_write_cmd(par->client, 0x10);
> +
> + for (j = 0; j < SSD1307FB_WIDTH; j++) {
> + u8 buf = 0;
> + for (k = 0; k < 8; k++) {
> + u32 page_length = SSD1307FB_WIDTH * i;
> + u32 index = page_length + (SSD1307FB_WIDTH * k + j) / 8;
> + u8 byte = *(vmem + index);
> + u8 bit = byte & (1 << (7 - (j % 8)));
> + bit = bit >> (7 - (j % 8));
> + buf |= bit << k;
> + }
> + ssd1307fb_write_data(par->client, buf);
> + }
> + }
> +
> + return;
> +}
> +
> +
Please remove unnecessary line.
> +static ssize_t ssd1307fb_write(struct fb_info *info, const char __user *buf,
> + size_t count, loff_t *ppos)
> +{
> + struct ssd1307fb_par *par = info->par;
> + unsigned long p = *ppos;
> + void *dst;
> + int err = 0;
> +
> + dst = (void __force *) (info->screen_base + p);
> +
> + if (copy_from_user(dst, buf, count))
> + err = -EFAULT;
> +
> + if (!err)
> + *ppos += count;
> +
> + ssd1307fb_update_display(par);
> +
> + return (err) ? err : count;
> +}
> +
> +static void ssd1307fb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
> +{
> + struct ssd1307fb_par *par = info->par;
> + sys_fillrect(info, rect);
> + ssd1307fb_update_display(par);
> +}
> +
> +static void ssd1307fb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
> +{
> + struct ssd1307fb_par *par = info->par;
> + sys_copyarea(info, area);
> + ssd1307fb_update_display(par);
> +}
> +
> +static void ssd1307fb_imageblit(struct fb_info *info, const struct fb_image *image)
> +{
> + struct ssd1307fb_par *par = info->par;
> + sys_imageblit(info, image);
> + ssd1307fb_update_display(par);
> +}
> +
> +static struct fb_ops ssd1307fb_ops = {
> + .owner = THIS_MODULE,
> + .fb_read = fb_sys_read,
> + .fb_write = ssd1307fb_write,
> + .fb_fillrect = ssd1307fb_fillrect,
> + .fb_copyarea = ssd1307fb_copyarea,
> + .fb_imageblit = ssd1307fb_imageblit,
> +};
> +
> +static void ssd1307fb_deferred_io(struct fb_info *info,
> + struct list_head *pagelist)
> +{
> + ssd1307fb_update_display(info->par);
> +}
> +
> +static struct fb_deferred_io ssd1307fb_defio = {
> + .delay = HZ,
> + .deferred_io = ssd1307fb_deferred_io,
> +};
> +
> +static int __devinit ssd1307fb_probe(struct i2c_client *client, const struct i2c_device_id *id)
> +{
> + struct fb_info *info;
> + u32 vmem_size = SSD1307FB_WIDTH * SSD1307FB_HEIGHT / 8;
> + struct ssd1307fb_par *par;
> + u8 *vmem;
> + int ret;
> +
> + if (!client->dev.of_node) {
> + dev_err(&client->dev, "No device tree data found!\n");
> + ret = -EINVAL;
> + goto generic_error;
> + }
How about using returning -EINVAL without goto.
It is simpler.
if (!client->dev.of_node) {
dev_err(&client->dev, "No device tree data found!\n");
return -EINVAL;
}
> +
> + info = framebuffer_alloc(sizeof(struct ssd1307fb_par), &client->dev);
> + if (!info) {
> + ret = -ENOMEM;
> + goto generic_error;
> + }
Ditto.
> +
> + vmem = devm_kzalloc(&client->dev, vmem_size, GFP_KERNEL);
> + if (!vmem) {
> + dev_err(&client->dev, "Couldn't allocate graphical memory.\n");
> + ret = -ENOMEM;
> + goto generic_error;
> + }
Please fix this 'goto generic_error'. goto generic_error cannot call
framebuffer_release(). If framebuffer_alloc() is already called,
framebuffer_release() should be called when error happens.
> +
> + info->fbops = &ssd1307fb_ops;
> + info->fix = ssd1307fb_fix;
> + info->fbdefio = &ssd1307fb_defio;
> +
> + info->var = ssd1307fb_var;
> + info->var.red.length = 1;
> + info->var.red.offset = 0;
> + info->var.green.length = 1;
> + info->var.green.offset = 0;
> + info->var.blue.length = 1;
> + info->var.blue.offset = 0;
> +
> + info->screen_base = (u8 __force __iomem *)vmem;
> + info->fix.smem_start = (unsigned long)vmem;
> + info->fix.smem_len = vmem_size;
> +
> + fb_deferred_io_init(info);
> +
> + par = info->par;
> + par->info = info;
> + par->client = client;
> +
> + par->reset = of_get_named_gpio(client->dev.of_node,
> + "oled-reset-gpio", 0);
> + if (gpio_is_valid(par->reset)) {
> + int flags = GPIOF_OUT_INIT_HIGH;
> + if (of_get_property(client->dev.of_node,
> + "oled-reset-active-low", NULL))
> + flags = GPIOF_OUT_INIT_LOW;
> + ret = devm_gpio_request_one(&client->dev, par->reset,
> + flags, "oled-reset");
> + if (ret) {
> + dev_err(&client->dev,
> + "failed to request gpio %d: %d\n",
> + par->reset, ret);
> + goto reset_oled_error;
> + }
> + }
> +
> + par->pwm = pwm_get(&client->dev, NULL);
> + if (IS_ERR(par->pwm)) {
> + dev_err(&client->dev, "Could not get PWM from device tree!\n");
> + ret = PTR_ERR(par->pwm);
> + goto pwm_error;
> + }
> +
> + par->pwm_period = pwm_get_period(par->pwm);
> +
> + dev_dbg(&client->dev, "Using PWM%d with a %dns period.\n", par->pwm->pwm, par->pwm_period);
> +
> + ret = register_framebuffer(info);
> + if (ret) {
> + dev_err(&client->dev, "Couldn't register the framebuffer\n");
> + goto fbreg_error;
> + }
> +
> + i2c_set_clientdata(client, info);
> +
> + /* Reset the screen */
> + gpio_set_value(par->reset, 1);
> + udelay(4);
> + gpio_set_value(par->reset, 0);
> + udelay(4);
> +
> + /* Enable the PWM */
> + pwm_config(par->pwm, par->pwm_period / 2, par->pwm_period);
> + pwm_enable(par->pwm);
> +
> + /* Map column 127 of the OLED to segment 0 */
> + ret = ssd1307fb_write_cmd(client, SSD1307FB_SEG_REMAP_ON);
> + if (ret < 0) {
> + dev_err(&client->dev, "Couldn't remap the screen.\n");
> + goto remap_error;
> + }
> +
> + /* Turn on the display */
> + ret = ssd1307fb_write_cmd(client, SSD1307FB_DISPLAY_ON);
> + if (ret < 0) {
> + dev_err(&client->dev, "Couldn't turn the display on.\n");
> + goto remap_error;
> + }
> +
> + dev_info(&client->dev, "fb%d: %s framebuffer device registered, using %d bytes of video memory\n",
> info->node, info->fix.id, vmem_size);
> +
> + return 0;
> +
> +remap_error:
> + unregister_framebuffer(info);
> + pwm_disable(par->pwm);
> +fbreg_error:
> + pwm_put(par->pwm);
> +pwm_error:
> +reset_oled_error:
> + fb_deferred_io_cleanup(info);
> + framebuffer_release(info);
> +generic_error:
> + return ret;
> +}
> +
> +static int __devexit ssd1307fb_remove(struct i2c_client *client)
> +{
> + struct fb_info *info = i2c_get_clientdata(client);
> + struct ssd1307fb_par *par = info->par;
How about insert new line between variables and functions
to enhance the readability?
> + unregister_framebuffer(info);
> + pwm_disable(par->pwm);
> + pwm_put(par->pwm);
> + fb_deferred_io_cleanup(info);
> + framebuffer_release(info);
> +
> + return 0;
> +}
> +
> +static const struct i2c_device_id ssd1307fb_i2c_id[] = {
> + { "ssd1307fb", 0 },
> + { }
> +};
> +MODULE_DEVICE_TABLE(i2c, ssd1307fb_i2c_id);
> +
> +static const struct of_device_id ssd1307fb_of_match[] = {
> + { .compatible = "solomon,ssd1307fb-i2c" },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, ssd1307fb_of_match);
> +
> +static struct i2c_driver ssd1307fb_driver = {
> + .probe = ssd1307fb_probe,
> + .remove = __devexit_p(ssd1307fb_remove),
> + .id_table = ssd1307fb_i2c_id,
> + .driver = {
> + .name = "ssd1307fb",
> + .of_match_table = of_match_ptr(ssd1307fb_of_match),
> + .owner = THIS_MODULE,
> + },
> +};
> +
> +module_i2c_driver(ssd1307fb_driver);
> +
> +MODULE_DESCRIPTION("FB driver for the Solomon SSD1307 OLED controler");
> +MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com>");
> +MODULE_LICENSE("GPL");
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences
From: Thierry Reding @ 2012-08-01 7:17 UTC (permalink / raw)
To: Alex Courbot
Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Stephen Warren, Greg Kroah-Hartman, Mark Brown,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
In-Reply-To: <5018997B.7010808-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2281 bytes --]
On Wed, Aug 01, 2012 at 11:50:35AM +0900, Alex Courbot wrote:
> On 07/31/2012 07:19 PM, Thierry Reding wrote:
> >* PGP Signed by an unknown key
> >
> >On Tue, Jul 31, 2012 at 06:51:03PM +0900, Alex Courbot wrote:
> >>I would like to do that actually. The issue is that it did not work
> >>go well with the legacy pwm_backlight behavior: a power sequence
> >>needs to be constructed out of a PWM obtained through
> >>pwm_request(int pwm_id, char *label) and this behavior cannot be
> >>emulated using the new platform data interface (which only works
> >>with pwm_get()). But if I remove this old behavior, then I could
> >>make power_seq opaque. I don't think many drivers are using it. What
> >>do you think?
> >
> >I don't see how that is relevant here, since this power-sequencing code
> >is supposed to be generic and not tied to any specific implementation.
> >Can you explain further?
> >
> >In any case you shouldn't be using pwm_request() in new code.
>
> Power sequences only rely on pwm_get, and never call pwm_request
> since it is, as you stated, deprecated. However there are still
> boards that use the old pwm_id member of the
> pwm_backlight_platform_data. For these, we must call pwm_request
> from the pwm_backlight driver in order to resolve the PWM (see
> pwm_backlight_legacy_probe of the seconds patch). As the PWM is
> being resolved by the backlight driver, and not within the power
> sequences parser, the resolved data structure must be visible to
> pwm_backlight so it can construct it. There are two ways to solve
> this and keep the power sequences structure private:
>
> 1) Add a way to resolve a PWM by id using pwm_request in the power
> sequences (we probably should not do that)
No. But I think we don't need that either. If you use power sequences,
then you shouldn't be using the pwm_id member. Both methods should be
exclusive.
> 2) Port the old platform pwm_request code to use pwm_add_table and
> pwm_get instead.
In the long term, every PWM user should move to pwm_add_table() and
pwm_get(), but there are quite a lot of boards that need conversion.
> Do I get points if I do 2)? :)
Yes. =) I have a sample patch for PXA EZX, but as I said, many more
boards need conversion.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [RFC][PATCH v3 1/3] runtime interpreted power sequences
From: Thierry Reding @ 2012-08-01 7:41 UTC (permalink / raw)
To: Mark Brown
Cc: Alex Courbot, Stephen Warren, Stephen Warren, Simon Glass,
Grant Likely, Rob Herring, Greg Kroah-Hartman, Arnd Bergmann,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fbdev@vger.kernel.org, devicetree-discuss@lists.ozlabs.org
In-Reply-To: <20120731153941.GF4468@opensource.wolfsonmicro.com>
[-- Attachment #1: Type: text/plain, Size: 876 bytes --]
On Tue, Jul 31, 2012 at 04:39:41PM +0100, Mark Brown wrote:
> On Tue, Jul 31, 2012 at 04:32:35PM +0200, Thierry Reding wrote:
> > On Tue, Jul 31, 2012 at 03:26:07PM +0100, Mark Brown wrote:
>
> > > This is framework code - it doesn't have much option. Disabling HOTPLUG
> > > is totally reasonable on space constrained systems, there's no reason
> > > for the code to break things for people.
>
> > Still if you use this code and disable HOTPLUG, then you shouldn't be
> > using modules either. I mean there is no way you can write a driver that
>
> Of course.
>
> > can gracefully handle its platform data being discarded.
>
> Sure there is - take a copy of the platform data in probe().
Yes, but that will only work for built-in drivers. If you unload the
module and that causes the platform data to be discarded, reloading
won't work.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* RE: [PATCH V2 5/5] arm: samsung: delete frame buffer header files from platform
From: Kukjin Kim @ 2012-08-01 9:39 UTC (permalink / raw)
To: 'Leela Krishna Amudala', 'Sylwester Nawrocki'
Cc: linux-arm-kernel, linux-samsung-soc, dri-devel, linux-fbdev,
ben-linux, inki.dae, joshi, jg1.han, m.szyprowski
In-Reply-To: <CAL1wa8cShB7zDj-CPvfEncX+Up7enKM9MJOt-488dThj_tXbMA@mail.gmail.com>
Leela Krishna Amudala wrote:
>
> Hello Kgene,
>
> On Wed, Aug 1, 2012 at 7:34 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> > Leela Krishna Amudala wrote:
> >>
> >> The FIMD register headers are moved to include/video/
> >> hence, deleting these files from platform side
> >>
> >> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> >> ---
> >> arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 159 ---------
> >> arch/arm/plat-samsung/include/plat/regs-fb.h | 403
> > -------------------
> >> ----
> >> 2 files changed, 0 insertions(+), 562 deletions(-)
> >> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
> >> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb.h
> >>
> > No. This should be squashed into first patch on this series. See below.
> >
> > arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 159
> > --------------------
> > .../plat/regs-fb.h => include/video/samsung_fimd.h | 145
> > ++++++++++++++++--
> > 2 files changed, 134 insertions(+), 170 deletions(-)
> > delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
> > rename arch/arm/plat-samsung/include/plat/regs-fb.h =>
> > include/video/samsung_fimd.h (74%)
> >
>
> If I squash it with the first patch and if somebody set that as a head
> commit, it will break the build. Hence, splitted it up from the first
> patch.
>
NACK. your changes are not adding just moving. So should be squashed. If
required, you could create just one patch for moving them, probably, 1st,
3rd, 4th and 5th patches into one patch.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> Thank you Sylwester for suggesting this split up change.
>
> Regards,
> Leela Krishna
^ permalink raw reply
* Re: [PATCH 2/4] ARM: dts: mxs: Add alternative I2C muxing options for imx28
From: Maxime Ripard @ 2012-08-01 9:46 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAOMZO5AaLB5m7TYPC03wTSFTDUTFrtV4Xr6gHrvKuGnpyUsf8Q@mail.gmail.com>
Hi,
Le 31/07/2012 14:02, Fabio Estevam a écrit :
> On Tue, Jul 31, 2012 at 7:29 AM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
>
>> + i2c0_pins_b: i2c0@1 {
>> + reg = <1>;
>> + fsl,pinmux-ids = <0x3001 0x3011>;
>
> Can you please also list the name of the pin as comment (just like you
> did for pwm4)?
>
> This would allow us to quickly identify the muxing option without the
> need of looking at the mxs pinctrl doc.
You're right, this will be in the next version.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* Re: [PATCH] Fix newport con crashes
From: Florian Tobias Schandinat @ 2012-08-01 9:52 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Thomas Bogendoerfer, linux-mips, linux-fbdev
In-Reply-To: <20120730133447.GA29993@linux-mips.org>
On 07/30/2012 01:34 PM, Ralf Baechle wrote:
> On Mon, Jul 30, 2012 at 12:54:16PM +0200, Thomas Bogendoerfer wrote:
>
>> Because of commit e84de0c61905030a0fe66b7210b6f1bb7c3e1eab
>> [MIPS: GIO bus support for SGI IP22/28] newport con is now taking over
>> console from dummy con, therefore it's necessary to resize the VC to
>> the correct size to avoid crashes and garbage on console
>>
>> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
>
> I've applied your patch to master and the affected -stable branches of the
> lmo git tree.
>
> Florian, since this is a driver specific to certain MIPS platforms I'd like
> to merge it through the MIPS tree with your ack, if that's ok?
Yes, sounds good to me. The patch looks good.
Best regards,
Florian Tobias Schandinat
^ permalink raw reply
* Re: [PATCH V2 0/5] arm: samsung: Move FIMD headers to include/video/
From: Florian Tobias Schandinat @ 2012-08-01 9:59 UTC (permalink / raw)
To: Kukjin Kim
Cc: 'Leela Krishna Amudala', linux-arm-kernel,
linux-samsung-soc, dri-devel, linux-fbdev, ben-linux, inki.dae,
joshi, jg1.han, m.szyprowski
In-Reply-To: <02f701cd6f8d$5ca3e850$15ebb8f0$%kim@samsung.com>
On 08/01/2012 02:28 AM, Kukjin Kim wrote:
> Leela Krishna Amudala wrote:
>>
>> This patchset moves the contents of regs-fb-v4.h and regs-fb.h from arch
>> side
>> to include/video/samsung_fimd.h
>>
>> This patchset is created and rebased against master branch of torvalds
>> tree.
>> Tested on smdk5250 board, build tested for other boards.
>>
> (Cc'ed Florian Tobias Schandinat)
>
> Yeah, since it's merge window, this series could be created against on
> mainline. And IMO, would be helpful to us if this series could be sent to
> upstream via samsung tree after reviewing, because this touches too many
> files in samsung tree and just adds include/video/samsung_fimd.h. But I'm
> not sure the added inclusion will be used in other file of drivers/video. If
> so, I can provide some topic branch can be merged into Florian's tree.
> Florian, how about?
Using a topic branch to merge it in both trees sounds like a good plan
to me.
Best regards,
Florian Tobias Schandinat
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
>> Changes from version 1:
>> - Split the patches as per Sylwester comments
>> - Changed FIMD_V8_xxx macro to EXYNOS5_xxx
>>
>> Leela Krishna Amudala (5):
>> include/video: Add samsung FIMD register header
>> include/video: Add Exynos5 specific FIMD register offsets
>> arm: samsung: Include the modified FIMD header file
>> driver: Include the modified FIMD header file
>> arm: samsung: delete frame buffer header files from platform
>>
>> arch/arm/mach-exynos/mach-nuri.c | 2 +-
>> arch/arm/mach-exynos/mach-origen.c | 2 +-
>> arch/arm/mach-exynos/mach-smdk4x12.c | 2 +-
>> arch/arm/mach-exynos/mach-smdkv310.c | 2 +-
>> arch/arm/mach-exynos/mach-universal_c210.c | 2 +-
>> arch/arm/mach-exynos/setup-fimd0.c | 2 +-
>> arch/arm/mach-s3c24xx/mach-smdk2416.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-anw6410.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-crag6410.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-hmt.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-mini6410.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-ncp.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-real6410.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
>> arch/arm/mach-s5p64x0/mach-smdk6440.c | 2 +-
>> arch/arm/mach-s5p64x0/mach-smdk6450.c | 2 +-
>> arch/arm/mach-s5pc100/mach-smdkc100.c | 2 +-
>> arch/arm/mach-s5pv210/mach-aquila.c | 2 +-
>> arch/arm/mach-s5pv210/mach-goni.c | 2 +-
>> arch/arm/mach-s5pv210/mach-smdkv210.c | 2 +-
>> arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 159
> ----------------
>> ----
>> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
>> drivers/video/s3c-fb.c | 2 +-
>> .../plat/regs-fb.h => include/video/samsung_fimd.h | 152
>> +++++++++++++++++--
>> 26 files changed, 165 insertions(+), 194 deletions(-)
>> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
>> rename arch/arm/plat-samsung/include/plat/regs-fb.h =>
>> include/video/samsung_fimd.h (74%)
>
>
^ permalink raw reply
* Re: [PATCH V2 5/5] arm: samsung: delete frame buffer header files from platform
From: Sylwester Nawrocki @ 2012-08-01 10:00 UTC (permalink / raw)
To: Kukjin Kim
Cc: 'Leela Krishna Amudala', linux-arm-kernel,
linux-samsung-soc, dri-devel, linux-fbdev, ben-linux, inki.dae,
joshi, jg1.han, m.szyprowski
In-Reply-To: <037101cd6fc9$85386e30$8fa94a90$%kim@samsung.com>
Hi,
On 08/01/2012 11:39 AM, Kukjin Kim wrote:
> Leela Krishna Amudala wrote:
>> On Wed, Aug 1, 2012 at 7:34 AM, Kukjin Kim <kgene.kim@samsung.com> wrote:
>>> Leela Krishna Amudala wrote:
>>>>
>>>> The FIMD register headers are moved to include/video/
>>>> hence, deleting these files from platform side
>>>>
>>>> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
>>>> ---
>>>> arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 159 ---------
>>>> arch/arm/plat-samsung/include/plat/regs-fb.h | 403
>>> -------------------
>>>> ----
>>>> 2 files changed, 0 insertions(+), 562 deletions(-)
>>>> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
>>>> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb.h
>>>>
>>> No. This should be squashed into first patch on this series. See below.
>>>
>>> arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 159
>>> --------------------
>>> .../plat/regs-fb.h => include/video/samsung_fimd.h | 145
>>> ++++++++++++++++--
>>> 2 files changed, 134 insertions(+), 170 deletions(-)
>>> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
>>> rename arch/arm/plat-samsung/include/plat/regs-fb.h =>
>>> include/video/samsung_fimd.h (74%)
>>>
>>
>> If I squash it with the first patch and if somebody set that as a head
>> commit, it will break the build. Hence, splitted it up from the first
>> patch.
>>
> NACK. your changes are not adding just moving. So should be squashed. If
> required, you could create just one patch for moving them, probably, 1st,
> 3rd, 4th and 5th patches into one patch.
Yes, this patch series is mainly moving files around. But to avoid git
bisect breakage, it should be split as it is done now, or the whole
series should be squashed into one patch. The latter might be even easier
to handle, but having a single patch touching arch/arm/ and drivers/
might not be a good idea. If you're fine handling that, then we just
need to squash this series into single patch.
It just need to be ensured, IMO, there is no bisection breakage.
--
Regards,
Sylwester
^ permalink raw reply
* RE: [PATCH V2 0/5] arm: samsung: Move FIMD headers to include/video/
From: Kukjin Kim @ 2012-08-01 10:03 UTC (permalink / raw)
To: 'Florian Tobias Schandinat'
Cc: 'Leela Krishna Amudala', linux-arm-kernel,
linux-samsung-soc, dri-devel, linux-fbdev, ben-linux, inki.dae,
joshi, jg1.han, m.szyprowski
In-Reply-To: <5018FDF6.4020205@gmx.de>
Florian Tobias Schandinat wrote:
>
> On 08/01/2012 02:28 AM, Kukjin Kim wrote:
> > Leela Krishna Amudala wrote:
> >>
> >> This patchset moves the contents of regs-fb-v4.h and regs-fb.h from
> arch
> >> side
> >> to include/video/samsung_fimd.h
> >>
> >> This patchset is created and rebased against master branch of torvalds
> >> tree.
> >> Tested on smdk5250 board, build tested for other boards.
> >>
> > (Cc'ed Florian Tobias Schandinat)
> >
> > Yeah, since it's merge window, this series could be created against on
> > mainline. And IMO, would be helpful to us if this series could be sent
> to
> > upstream via samsung tree after reviewing, because this touches too many
> > files in samsung tree and just adds include/video/samsung_fimd.h. But
> I'm
> > not sure the added inclusion will be used in other file of
drivers/video.
> If
> > so, I can provide some topic branch can be merged into Florian's tree.
> > Florian, how about?
>
> Using a topic branch to merge it in both trees sounds like a good plan
> to me.
>
Sure, if this change is ready, I will create topic branch then let you know.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply
* RE: [PATCH V2 5/5] arm: samsung: delete frame buffer header files from platform
From: Kukjin Kim @ 2012-08-01 10:09 UTC (permalink / raw)
To: 'Sylwester Nawrocki'
Cc: 'Leela Krishna Amudala', linux-arm-kernel,
linux-samsung-soc, dri-devel, linux-fbdev, ben-linux, inki.dae,
joshi, jg1.han, m.szyprowski
In-Reply-To: <5018FE28.8070907@samsung.com>
Sylwester Nawrocki wrote:
>
> Hi,
>
> On 08/01/2012 11:39 AM, Kukjin Kim wrote:
> > Leela Krishna Amudala wrote:
> >> On Wed, Aug 1, 2012 at 7:34 AM, Kukjin Kim <kgene.kim@samsung.com>
> wrote:
> >>> Leela Krishna Amudala wrote:
> >>>>
> >>>> The FIMD register headers are moved to include/video/
> >>>> hence, deleting these files from platform side
> >>>>
> >>>> Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com>
> >>>> ---
> >>>> arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 159 ---------
> >>>> arch/arm/plat-samsung/include/plat/regs-fb.h | 403
> >>> -------------------
> >>>> ----
> >>>> 2 files changed, 0 insertions(+), 562 deletions(-)
> >>>> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
> >>>> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb.h
> >>>>
> >>> No. This should be squashed into first patch on this series. See
below.
> >>>
> >>> arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 159
> >>> --------------------
> >>> .../plat/regs-fb.h => include/video/samsung_fimd.h | 145
> >>> ++++++++++++++++--
> >>> 2 files changed, 134 insertions(+), 170 deletions(-)
> >>> delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
> >>> rename arch/arm/plat-samsung/include/plat/regs-fb.h =>
> >>> include/video/samsung_fimd.h (74%)
> >>>
> >>
> >> If I squash it with the first patch and if somebody set that as a head
> >> commit, it will break the build. Hence, splitted it up from the first
> >> patch.
> >>
> > NACK. your changes are not adding just moving. So should be squashed. If
> > required, you could create just one patch for moving them, probably,
1st,
> > 3rd, 4th and 5th patches into one patch.
>
> Yes, this patch series is mainly moving files around. But to avoid git
> bisect breakage, it should be split as it is done now, or the whole
> series should be squashed into one patch. The latter might be even easier
> to handle, but having a single patch touching arch/arm/ and drivers/
> might not be a good idea. If you're fine handling that, then we just
> need to squash this series into single patch.
> It just need to be ensured, IMO, there is no bisection breakage.
>
I know you meant. But we don't need to keep the changes 'adding and
removing' for just moving on this.
I commented on 0/5 patch in this series before, if this is ready, I will
create topic branch so that it could be merged into both mine and Florian's.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ 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