From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH v3 3/4] pinctrl: cygnus: add initial IOMUX driver support Date: Tue, 3 Feb 2015 12:00:09 -0800 Message-ID: <20150203200009.GB15969@dtor-ws> References: <1422928894-20716-1-git-send-email-rjui@broadcom.com> <1422928894-20716-4-git-send-email-rjui@broadcom.com> <20150203174042.GA15969@dtor-ws> <54D121A0.6070602@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-ig0-f174.google.com ([209.85.213.174]:60253 "EHLO mail-ig0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756155AbbBCUAT (ORCPT ); Tue, 3 Feb 2015 15:00:19 -0500 Received: by mail-ig0-f174.google.com with SMTP id b16so29489873igk.1 for ; Tue, 03 Feb 2015 12:00:18 -0800 (PST) Content-Disposition: inline In-Reply-To: <54D121A0.6070602@broadcom.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Ray Jui Cc: Linus Walleij , Stephen Warren , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Grant Likely , Christian Daudt , Matt Porter , Florian Fainelli , Russell King , Scott Branden , Anatol Pomazau , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org On Tue, Feb 03, 2015 at 11:29:36AM -0800, Ray Jui wrote: > On 2/3/2015 9:40 AM, Dmitry Torokhov wrote: > > On Mon, Feb 02, 2015 at 06:01:33PM -0800, Ray Jui wrote: > >> + > >> +/* > >> + * List of pins in Cygnus > >> + */ > >> +static struct cygnus_pin cygnus_pins[] = { > > > > const? > > > I cannot make it const here, since the address of "gpio_mux" is later > passed to pinctrl_pin_desc's private data: > > pins[i].drv_data = &cygnus_pins[i].gpio_mux; The pinctrl code says: "@drv_data: driver-defined per-pin data. pinctrl core does not touch this" so we could theoretically cast away the constness and restore it when we access drv_data in pin control methods, but I won't insist. I am not sure which way looks nicer. Thanks. -- Dmitry From mboxrd@z Thu Jan 1 00:00:00 1970 From: dtor@google.com (Dmitry Torokhov) Date: Tue, 3 Feb 2015 12:00:09 -0800 Subject: [PATCH v3 3/4] pinctrl: cygnus: add initial IOMUX driver support In-Reply-To: <54D121A0.6070602@broadcom.com> References: <1422928894-20716-1-git-send-email-rjui@broadcom.com> <1422928894-20716-4-git-send-email-rjui@broadcom.com> <20150203174042.GA15969@dtor-ws> <54D121A0.6070602@broadcom.com> Message-ID: <20150203200009.GB15969@dtor-ws> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Feb 03, 2015 at 11:29:36AM -0800, Ray Jui wrote: > On 2/3/2015 9:40 AM, Dmitry Torokhov wrote: > > On Mon, Feb 02, 2015 at 06:01:33PM -0800, Ray Jui wrote: > >> + > >> +/* > >> + * List of pins in Cygnus > >> + */ > >> +static struct cygnus_pin cygnus_pins[] = { > > > > const? > > > I cannot make it const here, since the address of "gpio_mux" is later > passed to pinctrl_pin_desc's private data: > > pins[i].drv_data = &cygnus_pins[i].gpio_mux; The pinctrl code says: "@drv_data: driver-defined per-pin data. pinctrl core does not touch this" so we could theoretically cast away the constness and restore it when we access drv_data in pin control methods, but I won't insist. I am not sure which way looks nicer. Thanks. -- Dmitry