Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7593024imu; Tue, 22 Jan 2019 08:22:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN7sR3045ZwYDN4BHSJvwlQ8a/yaAJa7AyDV8k6LqCbgG9EXxdaDmsHnlrYWl7EWwSxmbYL9 X-Received: by 2002:a63:fb4c:: with SMTP id w12mr32703721pgj.321.1548174168140; Tue, 22 Jan 2019 08:22:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548174168; cv=none; d=google.com; s=arc-20160816; b=gKmpJsOh1Xm3CT6tNsYMd/rlP0bATPUq3ZLyatUj+zy/P5k7Ee+T9f1Ysff38wmYtv 9ox0smNfNlBpkYsdqMwqFEztSMfWNO5uvgEgwAl0SNN7VQAVIVwQJbimhVYc7Y0Hw+9m gyio70PjUqEYwYJ8vvYAlq5DebPHTaK1k8isct0JVUV8hBvQ9YwNZMmWylf1uQhqaRi4 IIcEhWwHJL8SLdl++07kQztdVKEIA3gNkh3MiEcelSwMqmlzLXqguvlXq4uQ73IY3x3B ucpOk2HUNWyE6cWsDKkRnyrMfZAiaSp6SxCR42lPWCdkulBKMzyC3smSWlssMYlm5SEB U6Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=PkOklqGVwHq7ll/rbU8Gr2vyzx12G/yCiDYJZx1VSDM=; b=SdgLgNKU9ZTGN8/M1OUjxfwKJRghwgSYDmYCvsFzVqy0JavszFlRT2lfFsEp/9RVHp VY56ZOd18qJ67qRt02fV0ZkI1USDF9cRbUEC9Y9pXfCnJg6HPlxutcvhVjsz7RILF52K obcSic8NOQvDS/yelqM/k9Sa0XmvxFSLguZ6mO+Wkd/Q4cHqkrjp5i+tjlF2zc0Jtg8u o/JLu4IlhNgwKd16fBRxF3UXVuwNYZDEIez9Xt2SAr/+qfKnl8eJVBmDyYs/MHoG14J+ ogQQqe0fdmh2s5Zp3TitxbQ1QAXDO/rehS2/hqDqJUl88dJ5CV6S9VzRR7NzTNawnYsZ SqvA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q64si14397291pga.280.2019.01.22.08.22.31; Tue, 22 Jan 2019 08:22:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729296AbfAVQVE (ORCPT + 99 others); Tue, 22 Jan 2019 11:21:04 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:40394 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728926AbfAVQVE (ORCPT ); Tue, 22 Jan 2019 11:21:04 -0500 Received: by mail-lj1-f194.google.com with SMTP id n18-v6so21133861lji.7; Tue, 22 Jan 2019 08:21:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PkOklqGVwHq7ll/rbU8Gr2vyzx12G/yCiDYJZx1VSDM=; b=WBMoRGlgxX0D6GftKGxZ4N7CTt7eY99/9t+w4xitQuDnXs05FrU9ve6X09TeHr5MRx Rsxq1X68mU2VDCUxNb26ilD3mmSyJ81WunYuOKc9C/tR3Ds6hcoTmol7fWCpXtqOIVFG fs2gCUDJ1ydG2a388byRKCLVvBO8+5/nGu3EzPldaWLx6fkd8UK+lx/qlkCU8XVjrMwY iIzNXT7b2g12A+yWfalgbr9K8iCxuhJTlBUJVmGwL31E+JIkfB0+8JahffCpPIlZzd62 Vb3XaBjrHIqNep/FvPG6XQCLuU24SVP30RbiJNbBRBCKeMUfCS0Kzenjql5915lnI/fi w8jw== X-Gm-Message-State: AJcUukdcujUYXPw5vua3sFOcmwJa6c0ljVe0Nt3bF/+OoXQ+XlHv3fUe ki/a15MIHvkXp97XdyXczsY= X-Received: by 2002:a2e:841:: with SMTP id g1-v6mr22650096ljd.21.1548174060850; Tue, 22 Jan 2019 08:21:00 -0800 (PST) Received: from localhost.localdomain (82-203-157-3.bb.dnainternet.fi. [82.203.157.3]) by smtp.gmail.com with ESMTPSA id p10-v6sm72214ljh.59.2019.01.22.08.20.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Jan 2019 08:21:00 -0800 (PST) Date: Tue, 22 Jan 2019 18:20:51 +0200 From: Matti Vaittinen To: Guenter Roeck Cc: mazziesaccount@gmail.com, lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, lgirdwood@gmail.com, broonie@kernel.org, gregkh@linuxfoundation.org, rafael@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linus.walleij@linaro.org, bgolaszewski@baylibre.com, sre@kernel.org, a.zummo@towertech.it, alexandre.belloni@bootlin.com, wim@linux-watchdog.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-watchdog@vger.kernel.org, mikko.mutanen@fi.rohmeurope.com, heikki.haikola@fi.rohmeurope.com Subject: Re: [RFC PATCH v1 05/13] mfd: bd70528: Support ROHM bd70528 PMIC - core Message-ID: <20190122162051.GA2559@localhost.localdomain> References: <9abdc69e-6aea-e1a5-c170-ebcba7f5b20f@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9abdc69e-6aea-e1a5-c170-ebcba7f5b20f@roeck-us.net> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Guenter, Thanks for taking the time and doing review! On Tue, Jan 22, 2019 at 06:51:26AM -0800, Guenter Roeck wrote: > On 1/22/19 1:44 AM, Matti Vaittinen wrote: > > +static DEFINE_MUTEX(rtc_timer_mutex); // snip > > +static int bd70528_i2c_probe(struct i2c_client *i2c, > > + const struct i2c_device_id *id) > > +{ > > + struct bd70528 *bd70528; > > + struct regmap_irq_chip_data *irq_data; > > + int ret, i; > > + > > + if (!i2c->irq) { > > + dev_err(&i2c->dev, "No IRQ configured\n"); > > + return -EINVAL; > > + } > > + bd70528 = devm_kzalloc(&i2c->dev, sizeof(*bd70528), GFP_KERNEL); > > + > > + if (!bd70528) > > + return -ENOMEM; > > + > > + dev_set_drvdata(&i2c->dev, bd70528); > > + bd70528->rtc_timer_lock = &rtc_timer_mutex; > > One global mutex for all instances of this driver is odd. > Why isn't this just part of struct bd70528 ? > You are right. This was a brainfart from my side. I don't think there is many cases where this would har though. I don't expect to see many instances of PMIC drivers load. But you are correct nevertheless. I will fix this in future version. Thanks for pointing it out! Br, Matti Vaittinen -- Matti Vaittinen ROHM Semiconductors ~~~ "I don't think so," said Rene Descartes. Just then, he vanished ~~~