From: m.szyprowski@samsung.com (Marek Szyprowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 4/7] ARM: S5PC110: Add si470x radio device to the GONI board
Date: Wed, 29 Sep 2010 07:28:30 +0200 [thread overview]
Message-ID: <00b601cb5f97$2a304ce0$7e90e6a0$%szyprowski@samsung.com> (raw)
In-Reply-To: <00c101cb5f16$1c5542a0$54ffc7e0$%kim@samsung.com>
Hello,
On Tuesday, September 28, 2010 4:05 PM Kukjin Kim wrote:
> > On Tuesday, September 28, 2010 9:44 AM Kukjin Kim wrote:
> >
> > > Marek Szyprowski wrote:
> > > >
> > > > Add required platform definitions for si470x radio device on Samsung
> > > > Goni board.
> > > >
> > > > Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> > > > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > > > ---
> > > > arch/arm/mach-s5pv210/Kconfig | 2 ++
> > > > arch/arm/mach-s5pv210/mach-goni.c | 30
> > > > ++++++++++++++++++++++++++++++
> > > > 2 files changed, 32 insertions(+), 0 deletions(-)
> > > >
> > > > diff --git a/arch/arm/mach-s5pv210/Kconfig
> b/arch/arm/mach-s5pv210/Kconfig
> > > > index b46925b..b1f671d 100644
> > > > --- a/arch/arm/mach-s5pv210/Kconfig
> > > > +++ b/arch/arm/mach-s5pv210/Kconfig
> > > > @@ -83,9 +83,11 @@ config MACH_GONI
> > > > select S3C_DEV_HSMMC
> > > > select S3C_DEV_HSMMC1
> > > > select S3C_DEV_HSMMC2
> > > > + select S3C_DEV_I2C1
> > > > select S5P_DEV_ONENAND
> > > > select SAMSUNG_DEV_KEYPAD
> > > > select S5PV210_SETUP_FB_24BPP
> > > > + select S5PV210_SETUP_I2C1
> > > > select S5PV210_SETUP_KEYPAD
> > > > select S5PV210_SETUP_SDHCI
> > > > help
> > > > diff --git a/arch/arm/mach-s5pv210/mach-goni.c
> > > b/arch/arm/mach-s5pv210/mach-
> > > > goni.c
> > > > index b263f3a..5677c4d 100644
> > > > --- a/arch/arm/mach-s5pv210/mach-goni.c
> > > > +++ b/arch/arm/mach-s5pv210/mach-goni.c
> > > > @@ -38,6 +38,7 @@
> > > > #include <plat/devs.h>
> > > > #include <plat/cpu.h>
> > > > #include <plat/fb.h>
> > > > +#include <plat/iic.h>
> > > > #include <plat/keypad.h>
> > > > #include <plat/sdhci.h>
> > > >
> > > > @@ -200,6 +201,27 @@ static struct samsung_keypad_platdata keypad_data
> > > > __initdata = {
> > > > .cols = 3,
> > > > };
> > > >
> > > > +/* Radio */
> > > > +static struct i2c_board_info i2c1_devs[] __initdata = {
> > > > + {
> > > > + I2C_BOARD_INFO("si470x", 0x10),
> > > > + },
> > > > +};
> > > > +
> > > > +static void __init goni_radio_init(void)
> > > > +{
> > > > + int gpio;
> > > > +
> > > > + gpio = S5PV210_GPJ2(4); /* XMSMDATA_4 */
> > > > + gpio_request(gpio, "FM_INT");
> > >
> > > If returned fail?
> >
> > Then there is something seriously wrong either with the platform or
> machine
> > startup code.
> >
> > It is quite common to omit a check in the machine init code. Just take a
> look
> > at mach-s3c64xx/mach-smdk6410.c, smdk6410_machine_init() function. Lack of
> > checks here doesn't really have ANY impact on the stability of the kernel
> imho.
> >
> Yeah...right now in our codes, something checked the returning of
> gpio_request, and others not and the board designer already know where it is
> used.
>
> Hmm...I'm not sure which is better to us...but is it better there is
> exception/error handling?
> Or...is it useless code?
IMHO such code is useless. If requesting a gpio fails then the kernel will throw
an ops or warning on the first use of that gpio pin, so the board designer will
know that something is really wrong there.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
next prev parent reply other threads:[~2010-09-29 5:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-20 12:55 [PATCH v2] ARM: S5PC110: Samsung Goni board update Marek Szyprowski
2010-09-20 12:55 ` [PATCHv2 1/7] ARM: S5PC110: update framebuffer setup information for Goni Marek Szyprowski
2010-09-28 7:07 ` Kukjin Kim
2010-09-20 12:55 ` [PATCHv2 2/7] ARM: S5PC110: fb setup for Goni - remove pixel clock Marek Szyprowski
2010-09-28 7:08 ` Kukjin Kim
2010-09-20 12:55 ` [PATCHv2 3/7] ARM: S5PC110: add support for S6E63M0 LCD controller on Goni board Marek Szyprowski
2010-09-28 7:38 ` Kukjin Kim
2010-09-28 12:27 ` Marek Szyprowski
2010-09-28 13:15 ` [PATCH v3] " Marek Szyprowski
2010-10-02 10:40 ` Kukjin Kim
2010-10-04 5:42 ` Marek Szyprowski
2010-09-20 12:55 ` [PATCHv2 4/7] ARM: S5PC110: Add si470x radio device to the GONI board Marek Szyprowski
2010-09-28 7:43 ` Kukjin Kim
2010-09-28 13:08 ` Marek Szyprowski
2010-09-28 14:04 ` Kukjin Kim
2010-09-29 5:28 ` Marek Szyprowski [this message]
2010-09-20 12:55 ` [PATCHv2 5/7] ARM: S5PV210: Enable USB HSOTG gadget build Marek Szyprowski
2010-09-28 7:53 ` Kukjin Kim
2010-09-20 12:55 ` [PATCHv2 6/7] ARM: S5PC110: add support for otg usb gadget on Goni board Marek Szyprowski
2010-09-28 7:54 ` Kukjin Kim
2010-09-20 12:55 ` [PATCHv2 7/7] ARM: S5PC110: add support for MMC regulators " Marek Szyprowski
2010-09-20 13:03 ` Mark Brown
2010-09-28 6:27 ` Kukjin Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00b601cb5f97$2a304ce0$7e90e6a0$%szyprowski@samsung.com' \
--to=m.szyprowski@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is 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).