From patchwork Tue Jan 22 13:48:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Shinde X-Patchwork-Id: 14209 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 E1F8F23E57 for ; Tue, 22 Jan 2013 13:41:23 +0000 (UTC) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by fiordland.canonical.com (Postfix) with ESMTP id 68ADCA1982B for ; Tue, 22 Jan 2013 13:41:23 +0000 (UTC) Received: by mail-vc0-f176.google.com with SMTP id fy27so2214929vcb.21 for ; Tue, 22 Jan 2013 05:41:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-auditid:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-brightmail-tracker:x-brightmail-tracker :dlp-filter:x-mtr:x-cfilter-loop:x-gm-message-state; bh=3QHQ0V1ioufasnIivoiNKQZMqSTCxun9Pv5eOD4DHe0=; b=Olb+mnC3/L2Twi1laGhROLmJrk3evaJYijHuWibB5p2rBgWNOsAGhRKJCkOWjD0KaL sYxiGAz1V6r7S5UYnavOfqHaQNEU27bXd9CvwGRSERn5jXi3eVf1jo5P6jJcntZK2tRR et5eIHdYnmRJ3EKfYziwXAywQp2yVydjTXWb8aETYZrjeUy6KOmnn2WIVeU5oBnJRB4e bfZvOPr9Nw8kKFL4Jgf0QA0DW9OwgYtoEupKxQXtFCfvzxzJ+a0HhLBfuquJxwI+/UEn S9CwrDeOI8uchyD4kwPOI+zpGQu7vx+68VH9wwLC7pQD12GjWN4ICAjx81jo7P5s1GXe 3Uig== X-Received: by 10.52.176.6 with SMTP id ce6mr20544281vdc.57.1358862082885; Tue, 22 Jan 2013 05:41:22 -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.58.145.101 with SMTP id st5csp251070veb; Tue, 22 Jan 2013 05:41:22 -0800 (PST) X-Received: by 10.68.227.97 with SMTP id rz1mr39238098pbc.54.1358862082038; Tue, 22 Jan 2013 05:41:22 -0800 (PST) Received: from mailout2.samsung.com (mailout2.samsung.com. [203.254.224.25]) by mx.google.com with ESMTP id y9si17314312paw.101.2013.01.22.05.41.21; Tue, 22 Jan 2013 05:41:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.25 as permitted sender) client-ip=203.254.224.25; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.25 as permitted sender) smtp.mail=rajeshwari.s@samsung.com Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MH1008EY4OWL130@mailout2.samsung.com>; Tue, 22 Jan 2013 22:41:20 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.125]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 98.5C.03918.0079EF05; Tue, 22 Jan 2013 22:41:20 +0900 (KST) X-AuditID: cbfee61a-b7f7d6d000000f4e-08-50fe9700b06f Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 18.5C.03918.0079EF05; Tue, 22 Jan 2013 22:41:20 +0900 (KST) Received: from rajeshwari-linux.sisodomain.com ([107.108.215.115]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MH100D7F4N8JQB0@mmp1.samsung.com>; Tue, 22 Jan 2013 22:41:20 +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/3 V2] S5P: GPIO: Add generic pin numbering API's Date: Tue, 22 Jan 2013 19:18:07 +0530 Message-id: <1358862489-28818-2-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1358862489-28818-1-git-send-email-rajeshwari.s@samsung.com> References: <1358862489-28818-1-git-send-email-rajeshwari.s@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrOLMWRmVeSWpSXmKPExsWyRsSkVpdh+r8Ag6kbjS0err/JYjHl8BcW ByaPO9f2sAUwRnHZpKTmZJalFunbJXBlzHnTz1iwlb3i1enMBsapbF2MnBwSAiYSOx9/Yoew xSQu3FsPFOfiEBJYyijxtbuBFabo6MTXLBCJRYwS125NhqqayCSx7e5HsCo2ASOJrSenMYLY IgISEr/6r4LZzAIxEq/3/wBbJyzgJLH6+m0wm0VAVeLviV1AUzk4eAU8JJ6uCIBYpiBxbOpX sJGcAp4SN2dMAisXAip5/fA6E8heCYHbbBI3Fx5khZgjIPFt8iGwORICshKbDjBDzJGUOLji BssERuEFjAyrGEVTC5ILipPScw31ihNzi0vz0vWS83M3MQKD8fS/Z1I7GFc2WBxiFOBgVOLh tXj0N0CINbGsuDL3EKMEB7OSCK9u/b8AId6UxMqq1KL8+KLSnNTiQ4zJQMsnMkuJJucDIyWv JN7Q2MTc1NjU0sjIzNSUNGElcV7GU08ChATSE0tSs1NTC1KLYLYwcXBKNTBapP7aPcHvjc4Z PmeHKWWXr4ctv1bENpO17nN2T9C5OFWOSef97lzju3zs/cpHp1hUhE+effe2YUtP8lMpxe+S e/wiDnN7fuHdGLUm7kgLn3NIp8+31mmF/SJ/o7qL17/ns2+6orPu6g/JZ/YdHXH8Nt8TrP48 Vso8HrBxx8o9hScrGcykc0qVWIozEg21mIuKEwGZl5I7igIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRmVeSWpSXmKPExsVy+t9jAV2G6f8CDKbdUrN4uP4mi8WUw19Y HJg87lzbwxbAGNXAaJORmpiSWqSQmpecn5KZl26r5B0c7xxvamZgqGtoaWGupJCXmJtqq+Ti E6DrlpkDNFtJoSwxpxQoFJBYXKykb4dpQmiIm64FTGOErm9IEFyPkQEaSFjDmDHnTT9jwVb2 ilenMxsYp7J1MXJySAiYSByd+JoFwhaTuHBvPVCci0NIYBGjxLVbk6GciUwS2+5+ZAWpYhMw kth6chojiC0iICHxq/8qmM0sECPxev8PsKnCAk4Sq6/fBrNZBFQl/p7YBbSBg4NXwEPi6YoA iGUKEsemfgUbySngKXFzxiSwciGgktcPrzNNYORdwMiwilE0tSC5oDgpPddQrzgxt7g0L10v OT93EyM41J9J7WBc2WBxiFGAg1GJh9fi0d8AIdbEsuLK3EOMEhzMSiK8uvX/AoR4UxIrq1KL 8uOLSnNSiw8xJgMdNZFZSjQ5HxiHeSXxhsYm5qbGppYmFiZmlqQJK4nzMp56EiAkkJ5Ykpqd mlqQWgSzhYmDU6qBMZH9TaVYlc8KB0vuLwFH74cZv/U4OaWt3b9uc4yAQpqMyofzisKfF66u M2m9+2/S7nMS39mKmV92fuZIWsN2/tetTyrzlAuOOP3QLrlto8oQ65m932nm1KUOc9kCfs9f 8m/Butv39ucz3Jo226vrfuTPh++OHuCdxb5kefbZbYsu9xXLPr14oUGJpTgj0VCLuag4EQDU U9/QuQIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQlEoJQhAsFhqFPRNv9IWPqvv8mEsUxSyRyiwBLfJKZnxypOUAAqDsOBdXwTakhgpDoOpg9V This patch adds API's to set config, drive and pull factor in gpio pin mumbering feature. Signed-off-by: Rajeshawari Shinde Acked-by: Simon Glass --- Changes in V2: - none. 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); +}