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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 A7C0BC433E0 for ; Tue, 9 Jun 2020 17:15:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8030820734 for ; Tue, 9 Jun 2020 17:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591722931; bh=1hv8Ta3NPq+cCRtS8AxD8w9rYZ/vbqZGGrF/WP8nXsM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=msGa1iCOfu4I+wgW863CoBzfNf4CduMrzjy3BbDDLCmnYX8HuMtAHxIo1RY7S/7EP ZSpRRrP/bVUUz3Y20EHbEmmXGmHJSLJPFlXVoS0vke8zRF4F4Q06RrmyDpn1Ek9t5O OLZuZ39vcm5D1Y+Bwmh1ZD5uKvkKd0HVukSA2y5s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731614AbgFIRP1 (ORCPT ); Tue, 9 Jun 2020 13:15:27 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:35545 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728556AbgFIRPY (ORCPT ); Tue, 9 Jun 2020 13:15:24 -0400 Received: by mail-io1-f68.google.com with SMTP id s18so23677110ioe.2; Tue, 09 Jun 2020 10:15:22 -0700 (PDT) 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; bh=JGLI/jshAv4UOtJl5rWJiq7REK+PfEQZi+2RrLn3IFA=; b=FJ2BXV8fElHPvhxX1kqSat7dr5hUgWprvrK07L0mkCWxEbdS1F1gDpdk6HJ1l4jpqw abSkXzUmBlH+3DWJI0POhl2FaWihi6dHbGf/evOvRazwzUU9M0cDL8k8hjwYKG0qUXjc 4Se9i2lNnOPKMpTGuNCKcEUadEleAcAMdGc5pdf908mFt+qZsBGYLwEvytAbTCRM/J6w wTYSpIEh7onBnmiK5q0Z80B2U4jl4cjh3S4d1rpguF/vRvwBYE600PoE3h4h/4lnnIQ3 YNHEm9WCMOGEUjVQo2eu2WfyYCbOuE+QQHXhozpcYrHH68953yQ0SUka9vDSD+efImfx kihA== X-Gm-Message-State: AOAM531N4hhgDIsMVjjiFbhxdcU7tRPzNDBUqUsX88+6lT6kwLc8wQEP fq6T02nb/8kKTwbCyKEjyA== X-Google-Smtp-Source: ABdhPJyom2HW81zaEPBo0bO0otJQ7le36pAHDKSbZIdASMosYcxXzc1o/KabAiMefhklBHue5cmzqQ== X-Received: by 2002:a5d:8e14:: with SMTP id e20mr28764204iod.156.1591722922294; Tue, 09 Jun 2020 10:15:22 -0700 (PDT) Received: from xps15 ([64.188.179.251]) by smtp.gmail.com with ESMTPSA id k5sm9534836ili.80.2020.06.09.10.15.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 10:15:21 -0700 (PDT) Received: (nullmailer pid 1093153 invoked by uid 1000); Tue, 09 Jun 2020 17:15:20 -0000 Date: Tue, 9 Jun 2020 11:15:20 -0600 From: Rob Herring To: Michael Walle Cc: Mark Brown , Lee Jones , Andy Shevchenko , Ranjani Sridharan , david.m.ertman@intel.com, shiraz.saleem@intel.com, "open list:GPIO SUBSYSTEM" , devicetree , Linux Kernel Mailing List , linux-hwmon@vger.kernel.org, linux-pwm@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-arm Mailing List , Linus Walleij , Bartosz Golaszewski , Jean Delvare , Guenter Roeck , Thierry Reding , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Wim Van Sebroeck , Shawn Guo , Li Yang , Thomas Gleixner , Jason Cooper , Marc Zyngier , Greg Kroah-Hartman , Andy Shevchenko Subject: Re: [PATCH v4 02/11] mfd: Add support for Kontron sl28cpld management controller Message-ID: <20200609171520.GC1019634@bogus> References: <20200608082827.GB3567@dell> <7d7feb374cbf5a587dc1ce65fc3ad672@walle.cc> <20200608185651.GD4106@dell> <32231f26f7028d62aeda8fdb3364faf1@walle.cc> <20200609064735.GH4106@dell> <32287ac0488f7cbd5a7d1259c284e554@walle.cc> <20200609144201.GK4583@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org On Tue, Jun 09, 2020 at 05:01:17PM +0200, Michael Walle wrote: > Am 2020-06-09 16:42, schrieb Mark Brown: > > On Tue, Jun 09, 2020 at 04:38:31PM +0200, Michael Walle wrote: > > > > > mfd-device@10 { > > > compatible = "simple-regmap", "simple-mfd"; > > > reg = <10>; > > > regmap,reg-bits = <8>; > > > regmap,val-bits = <8>; > > > sub-device@0 { > > > compatible = "vendor,sub-device0"; > > > reg = <0>; > > > }; > > > > A DT binding like this is not a good idea, encoding the details of the > > register map into the DT binding makes it an ABI which is begging for > > trouble. I'd also suggest that any device using a generic driver like > > this should have a specific compatible string for the device so we can > > go back and add quirks later if we need them. > > Like in the spidev case, yes. But OTOH if I _just_ encode the parameters > for the regmap a MFD, Lee don't agree because its just a shim. So either > way I seem to be stuck here. > > Where should I put the code to create an i2c driver, init a regmap and > populate its childen? Find another driver doing this already and rename it 'simple-mfd' (no relation to the DT binding) and add your compatible string to it. 'Generic' or 'simple' drivers don't require generic/simple DT bindings. Or extend the existing syscon driver to look up the bus_type and create the regmap based on the bus type? Rob