From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH] gpio: of: make it possible to name GPIO lines Date: Thu, 21 Apr 2016 00:21:39 +0200 Message-ID: References: <1461073157-26574-1-git-send-email-linus.walleij@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: Sender: linux-gpio-owner@vger.kernel.org To: Alexandre Courbot Cc: "linux-gpio@vger.kernel.org" , Alexandre Courbot , Johan Hovold , Michael Welling , Markus Pargmann , Arnd Bergmann , Bamvor Jian Zhang , Grant Likely , Rob Herring , "devicetree@vger.kernel.org" List-Id: devicetree@vger.kernel.org On Wed, Apr 20, 2016 at 3:10 AM, Alexandre Courbot wrote: >> + if (!ret) >> + gdev->descs[i].name = name; > > Shouldn't we check for name collision (by calling gpio_name_to_desc() > as gpiochip_set_desc_names() does) here? That check is there to avoid getting the same name twice in sysfs (which would fail), and this is not for sysfs, it is for the chardev. And I don't think so: atleast we should not look globally like that thing does. It need not be a unique name for the system, but I don't know if we should even enforce it to be a unique name for the chip. What do people think? Yours, Linus Walleij