From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 473A2C433E0 for ; Wed, 10 Jun 2020 07:29:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B24F2064C for ; Wed, 10 Jun 2020 07:29:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726367AbgFJH3F convert rfc822-to-8bit (ORCPT ); Wed, 10 Jun 2020 03:29:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbgFJH3F (ORCPT ); Wed, 10 Jun 2020 03:29:05 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC29EC03E96F for ; Wed, 10 Jun 2020 00:29:04 -0700 (PDT) Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jivAS-0007sn-5M; Wed, 10 Jun 2020 09:29:00 +0200 Received: from pza by lupine with local (Exim 4.92) (envelope-from ) id 1jivAQ-00031u-P3; Wed, 10 Jun 2020 09:28:58 +0200 Message-ID: <6e387142f0f07491f8b2b66c970e7ead8e94de7b.camel@pengutronix.de> Subject: Re: [PATCH 3/7] reset: add BCM6345 reset controller driver From: Philipp Zabel To: =?ISO-8859-1?Q?=C1lvaro_Fern=E1ndez?= Rojas , Florian Fainelli Cc: robh+dt@kernel.org, tsbogend@alpha.franken.de, Jonas Gorski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Date: Wed, 10 Jun 2020 09:28:58 +0200 In-Reply-To: <41A1CC01-BFA0-48A1-A2EE-7917B3A1323A@gmail.com> References: <20200609134232.4084718-1-noltari@gmail.com> <20200609134232.4084718-4-noltari@gmail.com> <341e8482c6bd06267633160d7358fa8331bef515.camel@pengutronix.de> <729976E9-CAF7-47B6-8783-5FD3D85F9EFD@gmail.com> <2a621f170574a616bcf047f6725c74552f7abbb1.camel@pengutronix.de> <46614E69-578A-4782-9D72-85B2D2F38FB8@gmail.com> <41A1CC01-BFA0-48A1-A2EE-7917B3A1323A@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Álvaro, On Wed, 2020-06-10 at 08:08 +0200, Álvaro Fernández Rojas wrote: > Hi Florian, > > > El 9 jun 2020, a las 22:17, Florian Fainelli escribió: > > > > > > > > On 6/9/2020 9:41 AM, Álvaro Fernández Rojas wrote: > > > > > > If you can do without this, with I think this driver could be made to > > > > > > use reset-simple. > > > > > > > > > > Yes, but only if I can add reset support with a configurable sleep range to reset-simple. Is this possible? > > > > > > > > I should have mentioned, support for this is on the reset/next branch: > > > > > > > > git://git.pengutronix.de/pza/linux.git reset/next > > > > > > Yes, but reset_us was only added to reset_simple_data, so there’s no way to fill that value from reset_simple_devdata or device tree, right? > > > > Not that I can see, but you could certainly extend it here: > > > > if (devdata) { > > reg_offset = devdata->reg_offset; > > if (devdata->nr_resets) > > data->rcdev.nr_resets = devdata->nr_resets; > > data->active_low = devdata->active_low; > > data->status_active_low = devdata->status_active_low; > > } > > Yes, I would extend it there too, You are right, reset_us is missing from reset_simple_devdata. > but I was just saying that it’s a bit strange that it was only added > to reset_simple_data without any way to fill the value. The patch was added for the benefit of drivers that register their own reset controller using reset_simple_data/ops, like sunxi or socfpga. This might be considered an oversight, but until now there was no user inside reset-simple.c. regards Philipp