linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2] arm: msm: fix up very basic HTC Sapphire support
@ 2012-05-13  4:47 Daniel Walker
  2012-05-13  5:56 ` David Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Walker @ 2012-05-13  4:47 UTC (permalink / raw)
  To: David Brown
  Cc: Olof Johansson, Bryan Huntsman, Russell King, linux-kernel,
	linux-arm-msm, linux-arm-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 4054 bytes --]

What you did wasn't what I was suggesting you do...

Keep your pull request available as it originally was and ill comment on the thread..

Daniel

David Brown <davidb@codeaurora.org> wrote:

>On Fri, May 11, 2012 at 10:45:52PM -0700, Olof Johansson wrote:
>
>> Sorry, I should have found the below items on the first review and not
>> now on the second one, but see below.
>
>Daniel, I don't mind fixing up minor things, but can you take care of
>the other issues that Olof has brought up.
>
>Thanks,
>David
>
>> On Fri, May 11, 2012 at 5:15 PM, David Brown <davidb@codeaurora.org> wrote:
>> > From: Daniel Walker <dwalker@fifo99.com>
>> >
>> > Adds sapphire into the make file, and fixes all the code problems that
>> > prevented it from building (including adding board-sapphire.h)
>> >
>> > [davidb@codeaurora.org: Move MACH_TROUT selection back under
>> > ARCH_MSM7X00A]
>> >
>> > Signed-off-by: Daniel Walker <dwalker@fifo99.com>
>> > Signed-off-by: David Brown <davidb@codeaurora.org>
>> > ---
>> > v2 - Moved MACH_TROUT selection back under the ARCH config target
>> >
>> >  arch/arm/mach-msm/Kconfig          |    9 +-
>> >  arch/arm/mach-msm/Makefile         |    1 +
>> >  arch/arm/mach-msm/board-sapphire.c |   18 +--
>> >  arch/arm/mach-msm/board-sapphire.h |  224 ++++++++++++++++++++++++++++++++++++
>> >  4 files changed, 234 insertions(+), 18 deletions(-)
>> >  create mode 100644 arch/arm/mach-msm/board-sapphire.h
>> >
>> > diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
>> > index 1cd40ad..70eae63 100644
>> > --- a/arch/arm/mach-msm/Kconfig
>> > +++ b/arch/arm/mach-msm/Kconfig
>> > @@ -6,7 +6,7 @@ choice
>> >
>> >  config ARCH_MSM7X00A
>> >        bool "MSM7x00A / MSM7x01A"
>> > -       select MACH_TROUT if !MACH_HALIBUT
>> > +       select MACH_TROUT if (!MACH_HALIBUT && !MACH_SAPPHIRE)
>> 
>> Better, thanks!
>> 
>> 
>> > diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
>> > index 4ad3969..aff4e5c 100644
>> > --- a/arch/arm/mach-msm/Makefile
>> > +++ b/arch/arm/mach-msm/Makefile
>> > @@ -20,6 +20,7 @@ CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
>> >  obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
>> >  obj-$(CONFIG_SMP) += headsmp.o platsmp.o
>> >
>> > +obj-$(CONFIG_MACH_SAPPHIRE) += board-sapphire.o devices-msm7x00.o
>> >  obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o
>> >  obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o board-trout-panel.o devices-msm7x00.o
>> >  obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o
>> 
>> Unrelated to this change per se, but it seems like devices-msm7x00.o
>> should be on an obj-$(CONFIG_ARCH_MSM7X00A) statement instead of
>> duplicated for all boards.
>> 
>> Also, the trout line is mostly duplicated, only delta is panel. Looks
>> broken. Both of these things is material for a separate patch though.
>> 
>> > diff --git a/arch/arm/mach-msm/board-sapphire.h b/arch/arm/mach-msm/board-sapphire.h
>> > new file mode 100644
>> > index 0000000..70f925e
>> > --- /dev/null
>> > +++ b/arch/arm/mach-msm/board-sapphire.h
>> > @@ -0,0 +1,224 @@
>> [..]
>> > +void config_sapphire_camera_on_gpios(void);
>> > +void config_sapphire_camera_off_gpios(void);
>> > +int sapphire_get_smi_size(void);
>> > +unsigned int sapphire_get_hwid(void);
>> > +unsigned int sapphire_get_skuid(void);
>> > +unsigned int is_12pin_camera(void);
>> > +int sapphire_is_5M_camera(void);
>> > +int sapphire_gpio_write(struct gpio_chip *chip, unsigned n, unsigned on);
>> 
>> Many (all?) of these functions are not to be found in the code. Please
>> don't add prototypes for code that isn't there.
>> 
>> 
>> -Olof
>
>-- 
>Sent by an employee of the Qualcomm Innovation Center, Inc.
>The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] arm: msm: fix up very basic HTC Sapphire support
@ 2012-05-09  8:39 Olof Johansson
  2012-05-12  0:15 ` [PATCH v2] " David Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Olof Johansson @ 2012-05-09  8:39 UTC (permalink / raw)
  To: Daniel Walker; +Cc: David Brown, Bryan Huntsman, Russell King, linux-kernel

Hi,

On Wed, Apr 11, 2012 at 9:04 PM, Daniel Walker <dwalker@fifo99.com> wrote:
> Adds sapphire into the make file, and fixes all the code problems that
> prevented it from building (including adding board-sapphire.h)
>
> Signed-off-by: Daniel Walker <dwalker@fifo99.com>
> ---
>  arch/arm/mach-msm/Kconfig          |   10 +-
>  arch/arm/mach-msm/Makefile         |    1 +
>  arch/arm/mach-msm/board-sapphire.c |   18 +--
>  arch/arm/mach-msm/board-sapphire.h |  224 ++++++++++++++++++++++++++++++++++++
>  4 files changed, 235 insertions(+), 18 deletions(-)
>  create mode 100644 arch/arm/mach-msm/board-sapphire.h
>
> diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
> index 1cd40ad..04f3b8e 100644
> --- a/arch/arm/mach-msm/Kconfig
> +++ b/arch/arm/mach-msm/Kconfig
> @@ -6,7 +6,6 @@ choice
>
>  config ARCH_MSM7X00A
>        bool "MSM7x00A / MSM7x01A"
> -       select MACH_TROUT if !MACH_HALIBUT
>        select ARCH_MSM_ARM11
>        select MSM_SMD
>        select MSM_SMD_PKG3
> @@ -80,6 +79,7 @@ config  MSM_VIC
>  menu "Qualcomm MSM Board Type"
>
>  config MACH_HALIBUT
> +       select MACH_TROUT if !MACH_SAPPHIRE && !MACH_HALIBUT

This doesn't seem to make much sense here.

>        depends on ARCH_MSM
>        depends on ARCH_MSM7X00A
>        bool "Halibut Board (QCT SURF7201A)"
> @@ -93,6 +93,14 @@ config MACH_TROUT
>        help
>          Support for the HTC Dream, T-Mobile G1, Android ADP1 devices.
>
> +config MACH_SAPPHIRE
> +       select MACH_TROUT if !MACH_HALIBUT && !MACH_SAPPHIRE

Nor does this.

I presume these are here to make sure that at least one of the boards
is selected. There are already build checks to make sure that at least
one machine entry exists, so if a user mis-configures his kernel he
will hit a build error. Seems as reasonable as any catch for this.

If you feel strongly that you need to select at least one board, then
do so at the ARCH_ level, not on every board option.


Thanks,

-Olof

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-15 15:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-13  4:47 [PATCH v2] arm: msm: fix up very basic HTC Sapphire support Daniel Walker
2012-05-13  5:56 ` David Brown
2012-05-15 10:19   ` Shantanu Gupta
2012-05-15 15:15     ` David Brown
  -- strict thread matches above, loose matches on Subject: below --
2012-05-09  8:39 [PATCH 1/2] " Olof Johansson
2012-05-12  0:15 ` [PATCH v2] " David Brown
2012-05-12  5:45   ` Olof Johansson
2012-05-12  7:17     ` David Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).