Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp101487imm; Wed, 3 Oct 2018 12:37:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV61vA2g2CGnL91uc+j5TyrCZy/0g6J+9MBVEQyYWl9X4djaYw6620iDwaoIUFnyjiYG6R4H6 X-Received: by 2002:a62:302:: with SMTP id 2-v6mr3084602pfd.145.1538595423658; Wed, 03 Oct 2018 12:37:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538595423; cv=none; d=google.com; s=arc-20160816; b=rjBknczSRdxcahUKMv7dsTG3GHjuEezrMqr5VvEaSwGz1/K8IEV7SfcVfdF8WvYoW8 PTacKXXPO7NZlohBOdNLMZ4o52nHgQdIcpeysRgBJijPaZfn9/nsHcYmD5OeO/PlfLfz glVyGpsefJl8vmHmPNeesSV6w2K3FBnrFXLO66xgWXzAGR5yAulfawRlem1RJCKZ+jxf BlBRxrJiVi8DhpvfefoqgudT27H4BuwqfBerWWubdmJXiMfUfGsMZUpkK3GS0PadDKd1 rZVvuSOnCuD4wRFlMZI7YxGuxdXqv75JnDKxzCmoy/XF6n5l9bI6TllRRY7Vh03CKNUC uSKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=eHHFO7uyGZb6ZELU2tYiiFprW0N1KBjfUAohhvgAqSw=; b=q8WqbQ9ISZjF3TiVrIHx4XMDdKQCHnG1VtX5AQPeh1VS/4BTktE4nK4me+s35ENOLg D2hWO8hrReGFiu/ZrMbs3fm27tUA2MFqa6J6P6ohVuKtrJNMRy25MCiIfN64haxmhf4u ILJ5nwdYaJkLa7yLTCZEJqqg/MzFBGgPdwdeuyQjrwv6F5MAave+vaf09kfoTu1Znkwx mHZoRHPujY+RdIJEiOTHC7s1PjTVHIPsQjbfSrioCa6HNuDsJXIPq9afB1xieDhaDszZ iyBD5KCwY7cGHm6rs3ohaNFfDCua8vHaO40QWsQer0L0jje/cUkakW+wLI2x/Wy8IF28 WKjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Aah8Y+7j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s6-v6si3071052pfd.59.2018.10.03.12.36.40; Wed, 03 Oct 2018 12:37:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Aah8Y+7j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727194AbeJDCY3 (ORCPT + 99 others); Wed, 3 Oct 2018 22:24:29 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:43513 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727120AbeJDCY3 (ORCPT ); Wed, 3 Oct 2018 22:24:29 -0400 Received: by mail-lj1-f196.google.com with SMTP id r8-v6so6186972ljc.10 for ; Wed, 03 Oct 2018 12:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eHHFO7uyGZb6ZELU2tYiiFprW0N1KBjfUAohhvgAqSw=; b=Aah8Y+7jpxZkOt9INDubpwpWL4wwe9djLEd3LerXVZq99Va+PXsZvFkTn8q34b7KRj 9WtRKDFQs6VEj5FCTOV0zQeULa4ZZrcY0LGsWbh7NDGsgJIkyYg79QdGAEaT8Wq1/aTa kVe6HEGzk8+qdFHSZu7vQ0XXBDnnMaiUa1PUL57nXestUYRZ3AwHrd5R7v0AhypyR+K/ ASHml3jq4fQEwi/buZs4EmAZPCdiltm3RFyOThJSZBh6+LoY4tbK3unnY9GNLWlQ6p+M xmozBorx+aMp9YsNlZrDyaMYi62Ohrpmz5Q3s61YqpSt8Wn9qavQk76haOmIHH9+SskG 0vpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eHHFO7uyGZb6ZELU2tYiiFprW0N1KBjfUAohhvgAqSw=; b=e2FMQMuUv1Bl43F/vrHV/hNd6Q3OOrKl6UmmNGC3sxACrgam71EIKdhyeCGA3rCHNC Tf6zN8TB12VmxMrYrw0yDnIqSpPilYofRkC1XUWNSUjcNqPBUwJd2+t0Bs0D+zceYonD h+UWLrOFSuESx7MXSd9+6GRc200zlRCWRKOchtbIS36mCu8bgq2zAFhnrvVTz4qPVpUb s+VPX6iMz6WIxfhvGIrwYv9cqOpfD+Q4X7GgkdzmpZ6GoW1yfdjMa0u3N8InX9xw8A3T orjGQI+n+ENUeXU02WX9cOOpo2XCPyppIsMN4ALxYaGMMKRN9B/kTfrLNiEawUpcivXo Us2w== X-Gm-Message-State: ABuFfohEEhzXLqcqNWdolon1qn9X4/G+c3HEGn6fob+JFvsGi/D7nXBF f4fjap5efyH6j5O2+FTVJuEFiRpxKMejduEvjqQ= X-Received: by 2002:a2e:8919:: with SMTP id d25-v6mr2224934lji.69.1538595282340; Wed, 03 Oct 2018 12:34:42 -0700 (PDT) MIME-Version: 1.0 References: <20181001124351.31615-1-ricardo.ribalda@gmail.com> <20181001124351.31615-8-ricardo.ribalda@gmail.com> <20181003190130.4c9e509f@bbrezillon> In-Reply-To: <20181003190130.4c9e509f@bbrezillon> From: Ricardo Ribalda Delgado Date: Wed, 3 Oct 2018 21:34:25 +0200 Message-ID: Subject: Re: [PATCH v4 8/8] mtd: maps: gpio-addr-flash: Add support for device-tree devices To: Boris Brezillon Cc: David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Zhouyang Jia , linux-mtd@lists.infradead.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris On Wed, Oct 3, 2018 at 7:01 PM Boris Brezillon wrote: > > On Mon, 1 Oct 2018 14:43:51 +0200 > Ricardo Ribalda Delgado wrote: > > > +static int gpio_flash_probe_gpios(struct platform_device *pdev, > > + struct async_state *state) > > +{ > > + struct physmap_flash_data *pdata; > > + struct device_node *dn; > > + struct resource *gpios = NULL; > > + int i; > > + > > + dn = pdev->dev.of_node; > > + if (dn) { > > + state->gpios = devm_gpiod_get_array(&pdev->dev, NULL, > > + GPIOD_OUT_LOW); > > Did you consider using gpiod_set_array_value() to update the gpio vals > instead of having your own update loop (the for loop in the > gf_set_gpios() func)? Yes briefly but there are some cons: - I need to allocate the value_array - I want to relay on my cached old values, so I still have to loop -- Ricardo Ribalda