From patchwork Wed Dec 12 11:33:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Shinde X-Patchwork-Id: 13501 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3467E23FD9 for ; Wed, 12 Dec 2012 11:28:45 +0000 (UTC) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) by fiordland.canonical.com (Postfix) with ESMTP id BEC81A182BE for ; Wed, 12 Dec 2012 11:28:44 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id 13so1526482iea.35 for ; Wed, 12 Dec 2012 03:28:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :dlp-filter:x-mtr:x-brightmail-tracker:x-brightmail-tracker :x-cfilter-loop:x-gm-message-state; bh=OzJSpGZMBouu5nidaYfvkcHMFybZYS+DjOAokB1xf50=; b=cFaMJBkrSEcsAQxLYEPVlsADzc03RJeHVQj2oTTficN0OFw78HPzgBr5mTXemZ1y0Q Qyn8W/R/MBP5s8mAQgEB3KjwUUMo0Kob7tLZUReF2njB7Yko5vz6tk1UdTH7lkBsYjUO chlnVByZfz3iBdjCvi1EjbPtZVYXR97513rFL3jbZvvGzeoAqBKDbCwlLVFA751OS/G4 GBeDBeRdmXOmRTkgL9ic+xz9dsZ764HTX8YMMW+znMpucYMsLOqXk3IrYkvhqtV/V7Aa +PcT8g/AB3C05B/iRG9TUtNZKurR0UR+WJEFD/avsWIlW7WjuvtxCxDt5pk3pPoM2Bx0 SReA== Received: by 10.50.187.197 with SMTP id fu5mr12867524igc.70.1355311724211; Wed, 12 Dec 2012 03:28:44 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp193223igt; Wed, 12 Dec 2012 03:28:43 -0800 (PST) Received: by 10.66.83.136 with SMTP id q8mr1800215pay.83.1355311723557; Wed, 12 Dec 2012 03:28:43 -0800 (PST) Received: from mailout4.samsung.com (mailout4.samsung.com. [203.254.224.34]) by mx.google.com with ESMTP id zw4si28708556pbc.184.2012.12.12.03.28.43; Wed, 12 Dec 2012 03:28:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.34 as permitted sender) client-ip=203.254.224.34; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.34 as permitted sender) smtp.mail=rajeshwari.s@samsung.com Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MEX0035S17TKD60@mailout4.samsung.com>; Wed, 12 Dec 2012 20:28:41 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.122]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id BA.BF.12699.96A68C05; Wed, 12 Dec 2012 20:28:41 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-2a-50c86a690af0 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 5A.BF.12699.96A68C05; Wed, 12 Dec 2012 20:28:41 +0900 (KST) Received: from rajeshwari-linux.sisodomain.com ([107.108.215.115]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MEX00KPG159B190@mmp2.samsung.com>; Wed, 12 Dec 2012 20:28:41 +0900 (KST) From: Rajeshwari Shinde To: u-boot@lists.denx.de Cc: patches@linaro.org, sjg@chromium.org, mk7.kang@samsung.com, chander.kashyap@linaro.org Subject: [PATCH 1/2] S5P: GPIO: Add generic pin mumbering API's Date: Wed, 12 Dec 2012 17:03:02 +0530 Message-id: <1355311983-19675-2-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1355311983-19675-1-git-send-email-rajeshwari.s@samsung.com> References: <1355311983-19675-1-git-send-email-rajeshwari.s@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsWyRsSkSjcz60SAwaupEhYP199ksZhy+AuL A5PHnWt72AIYo7hsUlJzMstSi/TtErgy+r9vZCqYxV4xt2EvSwNjM1sXIweHhICJxK8pVV2M nECmmMSFe+uBwlwcQgJLGSWePDjPBJEwkVhyqYEdIjGdUWLd+YmMEM5EJonXn46wgFSxCRhJ bD05jRHEFhGQkPjVfxXMZhaIkXi9/wcbiC0sYC8x+ektJpDNLAKqEt+uJ4KEeQU8JL7N/8YM sUxB4tjUr6wgNqeAp0TX5XtgY4SAan49/AkWZxEQkPg2+RALxAOyEpsOMIOcIyFwn03i+5rH LBBzJCUOrrjBMoFReAEjwypG0dSC5ILipPRcI73ixNzi0rx0veT83E2MwGA8/e+Z9A7GVQ0W hxgFOBiVeHgvvDweIMSaWFZcmXuIUYKDWUmEV9DzRIAQb0piZVVqUX58UWlOavEhRh+gSyYy S4km5wMjJa8k3tDYxNzU2NTSyMjM1BSHsJI4b7NHSoCQQHpiSWp2ampBahHMOCYOTqkGxozK Sbqs+23vPn2rJWsausDZuOiswsvs6Vd837289khL+9uzn2eZ3F8vOG1y6r9ubWlOQInOzKcV koHbj6VLcz9IqarauXMmu/bcnvzyJTevGWsmdD1dGH02d/3/tKqQ06yXNar5GgM3dbSesLz5 Y/WMFt5LD/zsP5tyRim0573rltzjznIuUYmlOCPRUIu5qDgRADo6Y7tzAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRmVeSWpSXmKPExsVy+t9jQd3MrBMBBu2zuS0err/JYjHl8BcW ByaPO9f2sAUwRjUw2mSkJqakFimk5iXnp2TmpdsqeQfHO8ebmhkY6hpaWpgrKeQl5qbaKrn4 BOi6ZeYAzVZSKEvMKQUKBSQWFyvp22GaEBripmsB0xih6xsSBNdjZIAGEtYwZvR/38hUMIu9 Ym7DXpYGxma2LkZODgkBE4kllxrYIWwxiQv31gPFuTiEBKYzSqw7P5ERwpnIJPH60xEWkCo2 ASOJrSenMYLYIgISEr/6r4LZzAIxEq/3/wCbKixgLzH56S2mLkYODhYBVYlv1xNBwrwCHhLf 5n9jhlimIHFs6ldWEJtTwFOi6/I9sDFCQDW/Hv5kncDIu4CRYRWjaGpBckFxUnqukV5xYm5x aV66XnJ+7iZGcLA/k97BuKrB4hCjAAejEg/vhZfHA4RYE8uKK3MPMUpwMCuJ8Ap6nggQ4k1J rKxKLcqPLyrNSS0+xOgDdNREZinR5HxgJOaVxBsam5ibGptamliYmFniEFYS5232SAkQEkhP LEnNTk0tSC2CGcfEwSnVwCg6J/nIfYl1CUcE4zlVXuqwn7XfuI815ZynwmFJzfVeGYk/5qkL +mn2LlvxkT1X5Mf+S+/dPthpPrn0Jaje75zz3AD+gmlpG49v259dJuo+JfLky92n/DetTjb5 bpgms/OG1YZTzX3/uWddm2t9R6CRY/XVPJk1rbcywney8wipTfDgFtDr61diKc5INNRiLipO BAB55SamowIAAA== X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQl6V8O4DX8I7ptvB+CIL1pBkJv84JpzUkrRsuYekE39RpMAPYwL9UUmxmgc5a6nVTu0480L This patch adds API's to set config,drive and pull factor in gpio pin mumbering feature. Signed-off-by: Rajeshawari Shinde --- drivers/gpio/s5p_gpio.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index 656bf4a..a53bdca 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -196,3 +196,21 @@ int gpio_set_value(unsigned gpio, int value) return 0; } + +void gpio_set_pull(int gpio, int mode) +{ + s5p_gpio_set_pull(s5p_gpio_get_bank(gpio), + s5p_gpio_get_pin(gpio), mode); +} + +void gpio_set_drv(int gpio, int mode) +{ + s5p_gpio_set_drv(s5p_gpio_get_bank(gpio), + s5p_gpio_get_pin(gpio), mode); +} + +void gpio_cfg_pin(int gpio, int cfg) +{ + s5p_gpio_cfg_pin(s5p_gpio_get_bank(gpio), + s5p_gpio_get_pin(gpio), cfg); +}