Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754942AbbKCImJ (ORCPT ); Tue, 3 Nov 2015 03:42:09 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:53981 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751016AbbKCImF (ORCPT ); Tue, 3 Nov 2015 03:42:05 -0500 From: Arnd Bergmann To: Lee Jones Cc: Damien Riegel , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, shawnguo@kernel.org, kernel@pengutronix.de, wim@iguana.be, robh+dt@kernel.org, sameo@linux.intel.com, dinh.linux@gmail.com, linux@roeck-us.net, kernel@savoirfairelinux.com Subject: Re: [PATCH v2 2/5] mfd: ts4800-syscon: add driver for TS-4800 syscon Date: Tue, 03 Nov 2015 09:40:52 +0100 Message-ID: <4911273.Q2mbQ2gvpn@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151103083923.GD3503@x1> References: <1446150450-22093-1-git-send-email-damien.riegel@savoirfairelinux.com> <20151103083817.GC3503@x1> <20151103083923.GD3503@x1> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:rRyrLQeJVcXBetq7t3ir9CjI89a7k74FBbax2KkUXpXyNyiiffo lT4QjsM9STyHHTGijE1yBmH4Q4D1fVXgalTH4d46+wzTgAKGW48VnNzf/JTqb4NsE556Agr XYKrRW9QXIjgvZMlJp/U1RGsDI+cvtKaKuijbn/MBTC4xRJpBZgRCIUujZWgL7sHsy6tTZT Auxx1N+c1uj6Lk4GFH4Ow== X-UI-Out-Filterresults: notjunk:1;V01:K0:o53iHNQOwIc=:a7gB8JRJFh5b6+/SVdfvGo oFw5ZNTFqh+DI/igKEFEqNFQVItkpDBBqj2nX9yBRZLtUjLNIDKurg3Jv8Vd0aLiX59AlIwJl 5TNW+nvdEuVOEPS+YKn2+CcEvFmqlVy1tePW06Z66s0nRwYRY/FHWfB8G+8VcXvO9kpKdDqWM QssmI83jZJXAZedpXRTMYd4+s36ussQiUDcUlEZgOMGcpgrFlr4NuYZsf0gAYceUnNLCPe43z OhctGxLN5nAFdZ1STdHYy/zdFBnT9omUjAfvJlM+R9RLKC8HnaD4X8lr+OW5g8q1tB3HOir5F xJFMeKndmLqPHbo88EbxtcVV0oKR5jt1O+N9/m9VKzcG8NK2ONvpuKz9VCTRRSzEUnAMb1Qh2 3xK+bybuCVmJAFFWwEMWcQ2eSK46cuMZKR8opSyxN2EIrwwVKAcoQZBA4H6gt20LuKu7aSeF2 YrAC7bOG/N8R04lQgs9u8/nTKPFQxqZw+WalGPz8M6Okmd0IOooQjcFDcOPQkrRHTQtiOncFZ ZtQ9B3BDI2WerYIiEpbtAp6IuUSsIvGK+cdgdl71gP07k48OydwTDBHkGEYfWAk17vxrkyw6Q 66niTEc9Dr3lfZIXoeJec2qmyVLNOKwbuun4r24ckhdpYkO2qA/dnQ3hJguev6XT4io7/zj7/ MzFjwj2UZQVYkyvVhLrvYpFzcT/DxyVzVZgYunByHK51CgDpwYg1IRKijRPBf2bRkVRkxadOM k32vTqdRZISkA88p Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2504 Lines: 63 On Tuesday 03 November 2015 08:39:23 Lee Jones wrote: > On Tue, 03 Nov 2015, Lee Jones wrote: > > > On Mon, 02 Nov 2015, Damien Riegel wrote: > > > On Mon, Nov 02, 2015 at 09:12:53AM +0000, Lee Jones wrote: > > > > [Cc'ing Arnd] > > > > > > > > On Fri, 30 Oct 2015, Damien Riegel wrote: > > > > > On Fri, Oct 30, 2015 at 05:56:56PM +0000, Lee Jones wrote: > > > > > > On Thu, 29 Oct 2015, Damien Riegel wrote: > > > > > > > > > > > > > Driver for TS-4800 syscon. These registers belong to a FPGA that is > > > > > > > memory mapped and are used for counters, enable various IPs in the FPGA, > > > > > > > control LEDs, control IOs, etc. > > > > > > > > > > > > > > Currently, only the watchdog is handled. > > > > > > > > > > > > Why do you require your own syscon driver? > > > > > > > > > > > > What's wrong with the generic one? > > > > > > > > > > > > > > > > The generic one uses a regmap_config with reg_stride set to 4 and val_bits > > > > > to 32. > > > > > > > > > > TS-4800 syscon registers are 16-bit wide and must be accessed with 16 > > > > > bit read and writes: > > > > > http://wiki.embeddedarm.com/wiki/TS-4800#Syscon > > > > > > > > > > I will address the other issues in the next version (split commit, > > > > > license issue, style, and superfluous remove). > > > > > > > > The Syscon driver was written to be generic so that each > > > > vendor/platform didn't require their own incarnation. How unique is > > > > the TS-4800? > > > > > > > > Perhaps it might be better to supply a generic 16 bit Syscon for > > > > devices akin to the TS-4800? > > > > > > The TS-4800 syscon could use a generic 16-bit syscon. There is nothing > > > specific that requires a driver besides that. > > > > > > We could add some optional properties to the generic syscon node to > > > configure reg_bits, val_bits, and reg_stride (and pad_bits ?). Would > > > that be a good solution ? > > > > Without looking at the ramifications of such an addition, the premise > > sounds good to me. So long as the current behaviour remains the > > default. > > Perhaps a "syscon-16bit" compatible might be in order? > > I think a 'buswidth=<16>;' property in addition to 'compatible="syscon"' is more in line with what other subsystems do. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/