From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753145AbdCHMhn (ORCPT ); Wed, 8 Mar 2017 07:37:43 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:33089 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752923AbdCHMhD (ORCPT ); Wed, 8 Mar 2017 07:37:03 -0500 Message-ID: <1488975630.2467.20.camel@pengutronix.de> Subject: Re: [PATCH 1/2] reset: add reset-simple to unify socfpga, stm32, and sunxi From: Philipp Zabel To: Alexandre Torgue Cc: Andre Przywara , linux-kernel@vger.kernel.org, Maxime Coquelin , Maxime Ripard , Chen-Yu Tsai Date: Wed, 08 Mar 2017 13:20:30 +0100 In-Reply-To: References: <20170308095423.3948-1-p.zabel@pengutronix.de> <1ed8aac5-5945-c265-2d66-17a260938372@arm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2017-03-08 at 12:05 +0100, Alexandre Torgue wrote: > Hi Philipp, > > On 03/08/2017 11:19 AM, Andre Przywara wrote: > > Hi, > > > > On 08/03/17 09:54, Philipp Zabel wrote: > >> Reset operations for simple reset controllers with reset lines that can > >> be controlled by toggling bits in (mostly) contiguous register ranges > >> using read-modify-write cycles under a spinlock. So far this covers the > >> socfpga, stm32, and sunxi drivers. > > > > Wow, that looks nice, thanks for that. > > > > But can't we go one step further and unify those driver into one file then? > > And either have different probe functions to cover the different DT > > requirements or to just have one unified probe checking for the super > > set of all properties? > > I agree with Andre. It looks nice and it should be a good thing to have > a common probe inside reset-simple.c > Maybe only "nresets" and "inverted" DT properties are needed. Adding DT properties is not an option, as the driver would have to work with the existing bindings. We could merge them into one file, with a single probe function that configures different parameters depending on the of_device_id returned by of_match_device. regards Philipp