Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1168614
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Chanwoo Choi <cwchoi00@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 3/5] extcon: arizona: Convert to gpiod |
| Date | Fri, 19 Jun 2015 10:40:01 +0200 |
| Message-ID | <pD009-25F-9@gated-at.bofh.it> (permalink) |
| References | <pCJsm-3cl-3@gated-at.bofh.it> <pCJso-3cl-39@gated-at.bofh.it> <pCUnM-2n4-3@gated-at.bofh.it> <pCZGN-1Jh-9@gated-at.bofh.it> |
| X-Original-To | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=jQu9ZQVb/pNqLQgZ99fSKEsP5gu5AVFviOP6AD75ZBY=; b=haqrYg/8gCD2eRmdsjqNfQqrB+wze15an2BQ+0Ki3cE2MVTN5JshxaF5OSLMaU8C5r 3Zpacykn40wsa+zhZYx0uJ2/sOj4a4he5yRXkKnjZh7ryrbE+7VsCrQHl5jYoVaNfeC6 fDZD9iEuxtrO8COxZbqEVSL/+LKsHoLU25o/I65R5x2H01CT5APWokUyIBbokSWv/mpo OsV5HTUKTDCfpoE7HsFUay8Fm/KitIJ3D8N3XfJy8yvfeelgUFCl3LTrPo1wCRmO0DwF Dj2DD7uOlUDhEMjVNioGRgk81/bRcLiqfAWXIjFP2MUMM3v1+eEr11wdSAftXBeK+2Sr DbCg== |
| MIME-Version | 1.0 |
| X-Received | by 10.50.97.105 with SMTP id dz9mr2799868igb.49.1434703162193; Fri, 19 Jun 2015 01:39:22 -0700 (PDT) |
| Reply-To | cw00.choi@samsung.com |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 46 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Lee Jones <lee.jones@linaro.org>, "myungjoo.ham@samsung.com" <myungjoo.ham@samsung.com>, Samuel Ortiz <sameo@linux.intel.com>, devicetree <devicetree@vger.kernel.org>, linux-kernel <linux-kernel@vger.kernel.org>, patches@opensource.wolfsonmicro.com |
| X-Original-Date | Fri, 19 Jun 2015 17:39:22 +0900 |
| X-Original-Message-ID | <CAGTfZH3USsR5AVQn2UMBH_y-25nsXBw3cdjBLbEiRWJu7Q+Tsg@mail.gmail.com> |
| X-Original-References | <1434638631-16451-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> <1434638631-16451-4-git-send-email-ckeepax@opensource.wolfsonmicro.com> <CAGTfZH0AsRwcFwevAiQeyL=VUxiCvCx+3OEFKQ4nV3DpRdsdoQ@mail.gmail.com> <20150619081433.GR32730@opensource.wolfsonmicro.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1168614 |
Show key headers only | View raw
On Fri, Jun 19, 2015 at 5:14 PM, Charles Keepax <ckeepax@opensource.wolfsonmicro.com> wrote: > On Fri, Jun 19, 2015 at 11:36:47AM +0900, Chanwoo Choi wrote: >> Hi Charles, >> >> On Thu, Jun 18, 2015 at 11:43 PM, Charles Keepax >> <ckeepax@opensource.wolfsonmicro.com> wrote: >> > Convert to using the newer gpiod interface for the micd_pol_gpio. >> > Although we still carry support for the old gpio interface from pdata. >> > >> > Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> >> > --- >> > + mode = GPIOD_OUT_HIGH; >> > + else >> > + mode = GPIOD_OUT_LOW; >> > + >> > + info->micd_pol_gpio = gpiod_get_optional(arizona->dev, >> > + "wlf,micd-pol", >> > + GPIOD_OUT_LOW); >> >> You can use the devm_gpiod_get_optional() to manage the system >> resource automatically. >> > > We can't actually use the devm call here, we need to pass > arizona->dev as that is where the DT will reside, which is the > device for the MFD. But if the devm is attached to the device for > the MFD then it will not clear up when the extcon driver is > unloaded. As such we have to do the put manually. > > I will look at respinning for the other comments. I don't understand. extcon-arizona.c used already following devm_* functions: - devm_kzalloc() - devm_regulator_get() - devm_extcon_dev_*() - devm_input_allocate_device() - devm_gpio_request_one() Thanks, Chanwoo Choi -- 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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v2 3/5] extcon: arizona: Convert to gpiod Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-06-19 10:20 +0200
Re: [PATCH v2 3/5] extcon: arizona: Convert to gpiod Chanwoo Choi <cwchoi00@gmail.com> - 2015-06-19 10:40 +0200
Re: [PATCH v2 3/5] extcon: arizona: Convert to gpiod Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-06-19 11:20 +0200
Re: [PATCH v2 3/5] extcon: arizona: Convert to gpiod Chanwoo Choi <cwchoi00@gmail.com> - 2015-06-19 12:00 +0200
Re: [PATCH v2 3/5] extcon: arizona: Convert to gpiod Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-06-19 12:00 +0200
csiph-web