Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp3830713ima; Mon, 4 Feb 2019 06:00:36 -0800 (PST) X-Google-Smtp-Source: AHgI3IYDGRrSnU8lUJ+Nb3+jdfbEBNy0GHNzZ3DpAYVdL+MO4Q4AqQyetZmw7+d3ZtJN9Q3eSNKP X-Received: by 2002:a17:902:e80a:: with SMTP id cq10mr8659884plb.200.1549288835979; Mon, 04 Feb 2019 06:00:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549288835; cv=none; d=google.com; s=arc-20160816; b=aB/oxiS93UPjROh+72DPvVsw6YYqV7cV3ZS/JGy5TAhMEQkmF8nrzlchzNP8vXfW9c bDR2gTo/UYv8IoUBrq3qnzTylYc1u4NtK5E/wLPmdgJRFmHvzoxS3fI51y62d/pnZxI4 gQm7y7UcILf0fn01Hjc7fKEbN3JEu6FKbNZ9B80YGQP5i6Zkwyj3YvWGY+cL0H3Egrlp wTEADKlWtGxySqOpwAMdg0nuLvMcQfrj+560zxB/9bQcaUgAghCnfjvYQNF9adR7LPWD utYESw9VIertMLjbCQ+rRePoDga4RZBmRTaZSaGtiHra44FD1nEUC4m1MWL/hiGTV1nq pDUQ== 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=osuavLz7brC0DOEgHfP8LzflHiXxFdskXEGvDqpOG8s=; b=vgcctmb2WkgMKvo576v6laoHZ7kbB4LFWWfm4O4OkFOvwlRlY7gWJIvZT88zKNSsWB TO5tAY51nhOQDEA0a01U9qrdF8Kqk6pgof1YfU/amxXPhGhUMjGFZIneQAPrOKRXJNc5 y0XRxitSVascRH9U21aKfwTJmGD0kJBz0RF/vkx3a2fHI30gZKXBkjGw8SQuLi+urMCq tSWWwirBjvUhdjTmuMLdxCFCXSUiLLMbfIeGI2j0Ehm8jz245d5zhbqpU/KL8iHl0qS5 Wq02925GJ6oGO6U4lhPKKiXQIPCXGprq9vZKAkpEEEwDQn/3dw35uKHIS3R2PDXYnizQ iaXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y0qLziCh; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 36si137159plc.250.2019.02.04.06.00.19; Mon, 04 Feb 2019 06:00:35 -0800 (PST) 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=@linaro.org header.s=google header.b=Y0qLziCh; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729019AbfBDLaM (ORCPT + 99 others); Mon, 4 Feb 2019 06:30:12 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:45778 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728887AbfBDLaH (ORCPT ); Mon, 4 Feb 2019 06:30:07 -0500 Received: by mail-lj1-f194.google.com with SMTP id s5-v6so11169551ljd.12 for ; Mon, 04 Feb 2019 03:30:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=osuavLz7brC0DOEgHfP8LzflHiXxFdskXEGvDqpOG8s=; b=Y0qLziChpsM3r8H1BSfx7euAyCtU8/9iWn5+GyA7WAUkeWIN1wdilggaGPVaeBQHNV SqLKI7IxynjARG3qvzpHkfE+UlmhNJ7J+HoayHrEOVy3iCEJm5YgVAqoDve9RSjiI2BG waxPUywCHieJtFGrNb2x0e3YYvGPrHb0Yhepk= 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=osuavLz7brC0DOEgHfP8LzflHiXxFdskXEGvDqpOG8s=; b=JOHwnhvjVMsIGjnRnzDZB45DJsipv2Stj0JEfSMBdtSedrMNLNXiBJt0QoTND1TOzB LiiPvDi32Xt3vLKz73J0ShZyGT7oJK35apAJoJC0357Xl5Pp30WsCXYCdGSl81EFJ4FA AIWC6Hbdp9kwNCtXcikWIIiX+PCJKXJzz5/cmeYbabhjbpLQwGBRexATddN3+opvb1Fi c2Oj2uycHnXAdCD46z9EhBYj+3LDS+tgzRNREdlpaGb+67avHEbdf8Litts310bSWPis d8rdgIz4ML07ArqzYPfYG3e6M/XDNSh4AA8fX9u4cmz1E8pQtSd44JM78rvuJtwlhc/S 6c4Q== X-Gm-Message-State: AJcUukcYI8goAjpVIO04U422mLJz21/Lva2n8sHTgP4nrxYQjStwEyQ4 4zU2IHYAPsYTlgE04ctKn5UhSJYkYHZE251b1dqkGw== X-Received: by 2002:a2e:568d:: with SMTP id k13-v6mr42136476lje.105.1549279805224; Mon, 04 Feb 2019 03:30:05 -0800 (PST) MIME-Version: 1.0 References: <5f63684b62c7a320c514088bcf9091ed7efbd2cc.1548935790.git.matti.vaittinen@fi.rohmeurope.com> In-Reply-To: <5f63684b62c7a320c514088bcf9091ed7efbd2cc.1548935790.git.matti.vaittinen@fi.rohmeurope.com> From: Linus Walleij Date: Mon, 4 Feb 2019 12:29:53 +0100 Message-ID: Subject: Re: [RFC PATCH v4 07/10] gpio: Initial support for ROHM bd70528 GPIO block To: Matti Vaittinen Cc: Matti Vaittinen , heikki.haikola@fi.rohmeurope.com, mikko.mutanen@fi.rohmeurope.com, Lee Jones , Rob Herring , Mark Rutland , Mark Brown , Greg KH , "Rafael J. Wysocki" , Michael Turquette , Stephen Boyd , Bartosz Golaszewski , Sebastian Reichel , Liam Girdwood , Alessandro Zummo , Alexandre Belloni , Wim Van Sebroeck , Guenter Roeck , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" , linux-clk , "open list:GPIO SUBSYSTEM" , Linux PM list , linux-rtc@vger.kernel.org, LINUXWATCHDOG 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 On Thu, Jan 31, 2019 at 1:08 PM Matti Vaittinen wrote: > ROHM BD70528 PMIC has 4 GPIO pins. Allow them to be > controlled by GPIO framework. > > IRQs are handled by regmap-irq and GPIO driver is not > aware of the irq usage. > > Signed-off-by: Matti Vaittinen (...) > I dropped the review-by from Linus Walleij because I would like to > get a comment on if locking is required when we check the direction > in order to detect the correct register for getting the pin state. I don't know that. You isn't regmap locking inherently? > My initial feeling is that locking makes no sense. Mine too. > + bdgpio->gpio.get_direction = &bd70528_get_direction; > + bdgpio->gpio.direction_input = &bd70528_direction_input; > + bdgpio->gpio.direction_output = &bd70528_direction_output; > + bdgpio->gpio.set_config = &bd70528_gpio_set_config; > + bdgpio->gpio.can_sleep = true; > + bdgpio->gpio.get = &bd70528_gpio_get; > + bdgpio->gpio.set = &bd70528_gpio_set; Drop the &ersand in from of the functions. All functions are pointers. With that: Reviewed-by: Linus Walleij Yours, Linus Walleij