Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3468879pxb; Mon, 9 Nov 2020 11:57:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbuvBn+QXTCzfRk0NtDgrCXsWtOIHAzq6jzNgAJvQ3tzGaObmfosNg69+Fdj1pFCS56q+Z X-Received: by 2002:a05:6402:16d5:: with SMTP id r21mr4645929edx.149.1604951869502; Mon, 09 Nov 2020 11:57:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604951869; cv=none; d=google.com; s=arc-20160816; b=KdQ5iVoIdhIMawn7SP3GjhsLyGnbC1/LsnHD7kZd3X2NENZIyAN0YRWvHHZ2F4fqtq 0j0wMxgbe4zbMPM9aWQ8Bfkv9qo1I/4etun0nAsmROtWYcU+nJOdbY+vmCbpiDk1F/yf UfEOpEdTkP2nvB2w0U2AfjcC3Vz4jdgK21aRxXuRTrX0i0o3y5cFgL6ThjhNW+kgd/fJ uo9NOw2+PaZKh2AP1lcLkuygY7YyXK2IazFuSrcOovIBsqg4yFUPTWhIhzHbzPwsdmmH +63/v3Axj/sf1WMJsSQUo4eyyM7SIH/JSg2bPhbUmGYf1fs2wUFT+Wj1Ix2AmuDbiEDM 7f5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:mime-version:user-agent :message-id:in-reply-to:date:subject:cc:to:from:dkim-signature :dkim-filter; bh=jnOfB+OgvVPZ78iz7kLNUCSzkcrxoXhuBH9az0x99sM=; b=ruLK5UFqnwW+lwcoBYGm/XvAU1S6grcJxgKipUCb5+C3QDVSWR+0L03yWh/UhtTkBA mkhL69oDE0jx+qNqcr81Wb9CBXiiJY2QF5dXSZZ6PCTV5wjkfriTtJig9YYXPPbhNAje bhC61R3IDJHcsLzo8WnLfdYn2H5alwzP1NZiON1h/1RN7KG08I0Z+w/bH7l8Ifda+hje 9C/l3RDnKSn80yNe47oXVXkkVVlkAiVrpzE5u+AQPweMhk/YN5D+xxOaypYKAGW+CR6Y cW6TmQ40UaOkCxNaZgi2bloNEBDGg5pyzLcEiKFlHZnTOhNeAk8GMEnVryinsX9J6VlI 5F7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=p2uoqs6M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bh4si9964563ejb.551.2020.11.09.11.57.25; Mon, 09 Nov 2020 11:57:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=p2uoqs6M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731010AbgKITzS (ORCPT + 99 others); Mon, 9 Nov 2020 14:55:18 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:50944 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730952AbgKITzR (ORCPT ); Mon, 9 Nov 2020 14:55:17 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201109195505euoutp02bc352735b45aef247a5dfb978a3d818b~F7xKe19X50079000790euoutp02D; Mon, 9 Nov 2020 19:55:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201109195505euoutp02bc352735b45aef247a5dfb978a3d818b~F7xKe19X50079000790euoutp02D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1604951705; bh=jnOfB+OgvVPZ78iz7kLNUCSzkcrxoXhuBH9az0x99sM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p2uoqs6MppxOcXRiqOOAaiSMGheIDQglOYf50J5PhI9NOh0dQMUCKu0piTo4U5LWC kBIR+obilZiAew5mtWiwtXwHcwKqJqYKCxHYOidzTH2v8rGzEDhPhByLbG1lOQch/k DZB8PSlgLKLfcyMCPnt0F2/fglKc6gcjdsX3iQUA= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201109195504eucas1p1ce7307af408a8dd879e1474dd205e30f~F7xJ60Y1f2806328063eucas1p1y; Mon, 9 Nov 2020 19:55:04 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C5.53.06456.89E99AF5; Mon, 9 Nov 2020 19:55:04 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201109195504eucas1p19d493c947d8752e39c26202cf0978fc0~F7xJUnd_D2807128071eucas1p1e; Mon, 9 Nov 2020 19:55:04 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201109195504eusmtrp1e13153a69360711e0908aab0509c151a~F7xJTR5Gd1820718207eusmtrp1I; Mon, 9 Nov 2020 19:55:04 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-22-5fa99e98b93d Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 01.66.06314.49E99AF5; Mon, 9 Nov 2020 19:55:00 +0000 (GMT) Received: from localhost (unknown [106.120.51.46]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201109195500eusmtip2d42034bc8abfbcd6904ac41a95850e76~F7xFwHqVw3224332243eusmtip2J; Mon, 9 Nov 2020 19:55:00 +0000 (GMT) From: Lukasz Stelmach To: Dmitry Torokhov Cc: Andy Shevchenko , "Rafael J. Wysocki" , Heikki Krogerus , Mika Westerberg , Linus Walleij , Ard Biesheuvel , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Marek Szyprowski , Bartlomiej Zolnierkiewicz Subject: Re: [PATCH v8 3/6] software node: implement reference properties Date: Mon, 09 Nov 2020 20:54:59 +0100 In-Reply-To: <20201109185305.GT1003057@dtor-ws> (Dmitry Torokhov's message of "Mon, 9 Nov 2020 10:53:05 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Brightmail-Tracker: H4sIAAAAAAAAA02SeUiTcRjH+e19926OJq/zetCwHNlh6bKi3tAso2hFRFGkFGVTX1R00zaP 9J9keKRoigfqMkkr73OK54y0lYl5hhF4FCJ4luGdebTXV8H/Ps/3+T7Xjx8fEw1xrfj+ihBa qZAFigkBXvfpb7dDVm6x5/GN2RNUkjqTQ23+aUZUdVYll/qQP4GohNJGnEpfK+RQhe+SEfW1 KYegyvXDPCq9Xs+jSnUTGPVyIQO7sEfaqBnmSbUl8YR06JuOkOZ23JI+ry1B0nmtzU3insDF hw70D6OVEtdHAr8+dSwW/NH6ybhuBkWhzxYJyIgP5CkoW1okGBaRRQh0anuWFxDoh8ITkMDA 8wiqstW8nYKfswMEmyhEsNSfth2MI+hZTTYEfD5BOkJ5uQdTYEZKoP7FKmI8GLmCQWNKHM4k TMmrEDM5iTGMk3bwZVO3NcGIfAz9GcUchoXkGWgYX0cMm5NnoXbiB4/VTaAje2yrD0bKIbtn BrHbrfNgtPYwswOQl0CjdmdlU5hqr90+YC90piXirOU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4kRGJPbjv3cvIPx0sbgQ4wCHIxKPLwH/iyLF2JNLCuuzD3EqAI05tGG1RcYpVjy8vNSlUR4 nc6ejhPiTUmsrEotyo8vKs1JLT7EaAr050RmKdHkfGAaySuJNzQ1NLewNDQ3Njc2s1AS5+0Q OBgjJJCeWJKanZpakFoE08fEwSnVwJgxO8x3n71Il3TOQfNOzjnS98XOHHzOwya7jqGNMeT4 Ass5Nxbc3Pbh1p5nt9WalTf1XdAR+dC1OFtkacg888XLdX4ejmq99M5ukZ5Prl/e7Q3O67Wj P+fJ96t/VnsxJWxV7pLvyg7pfPrRPOtkw0IXaWxqLToxieXO7G8rtn916L93bIuRo44SS3FG oqEWc1FxIgAxMy+F6wIAAA== X-CMS-MailID: 20201109195504eucas1p19d493c947d8752e39c26202cf0978fc0 X-Msg-Generator: CA X-RootMTR: 20201109195504eucas1p19d493c947d8752e39c26202cf0978fc0 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201109195504eucas1p19d493c947d8752e39c26202cf0978fc0 References: <20201109185305.GT1003057@dtor-ws> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable It was <2020-11-09 pon 10:53>, when Dmitry Torokhov wrote: > On Mon, Nov 09, 2020 at 07:18:37PM +0100, Lukasz Stelmach wrote: >> It was <2020-11-09 pon 19:24>, when Andy Shevchenko wrote: >> > On Mon, Nov 09, 2020 at 06:02:29PM +0100, Lukasz Stelmach wrote: >> >> It was <2019-11-07 czw 20:22>, when Dmitry Torokhov wrote: >> >> > It is possible to store references to software nodes in the same fa= shion as >> >> > other static properties, so that users do not need to define separa= te >> >> > structures: >> >> > >> >> > static const struct software_node gpio_bank_b_node =3D { >> >> > .name =3D "B", >> >> > }; >> >> > >> >> > static const struct property_entry simone_key_enter_props[] =3D { >> >> > PROPERTY_ENTRY_U32("linux,code", KEY_ENTER), >> >> > PROPERTY_ENTRY_STRING("label", "enter"), >> >> > PROPERTY_ENTRY_REF("gpios", &gpio_bank_b_node, 123, GPIO_ACTIVE_LO= W), >> >> > { } >> >> > }; >> >> > >> >> > Signed-off-by: Dmitry Torokhov >> >> > --- >> >>=20 >> >> I am writing a piece that needs to provide a list of gpios to a >> >> diriver. The above example looks like what I need. >> > >> > Nope. >> > >> > It mustn't be used for GPIOs or PWMs or whatever that either should co= me via >> > lookup tables or corresponding firmware interface. >> > >>=20 >> May I ask why? I've read commit descriptions for drivers/base/swnode.c >> and the discussion on lkml and I understand software nodes as a way to >> provide (synthesize) a description for a device that is missing a >> description in the firmware. Another use case seems to be to replace (in >> the long run) platform data. That is what I am trying to use it for. >>=20 >> I want my device to be configured with either DT or software_nodes >> created at run time with configfs. My device is going to use GPIOs >> described in the DT and it is going to be configured via configfs at run >> time. I could use platform_data to pass structures from configfs but >> software nodes would let me save some code in the device driver and use >> the same paths for both static (DT) and dynamic (configfs) >> configuration. >>=20 >> Probably I have missed something and I will be greatful, if you tell me >> where I can find more information about software nodes. There are few >> users in the kernel and it isn't obvious for me how to use software >> nodes properly. > > Yeah, I disagree with Andy here. The lookup tables are a crutch that we > have until GPIO and PWM a taught to support software nodes (I need to > resurrect my patch series for GPIO, if you have time to test that would > be awesome). It will be great to help. I=C2=A0am not sure if I have means to test PWMs, but I can do GPIOs. =2D-=20 =C5=81ukasz Stelmach Samsung R&D Institute Poland Samsung Electronics --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEXpuyqjq9kGEVr9UQsK4enJilgBAFAl+pnpMACgkQsK4enJil gBByKQgAkxubb9+fQ8Q8CxUOcAoEFhm9/mGmiqvKYt3tMj8QFl6Ns4SKyo5koe2g CfZvxmo64cv2mOOkcRCxVqU7A3WbNvhJoaJUmnvOURCT/nTSfx5fJGYzwshQz30N wUFPjhWO8N2K7vyL+xUUor5ZHe2By0k9b0PHPLe7w1mprQ9TBFlTvDIK4eDDTY8b c3omtlW9HX6GR0tc7UCcTRpNofSuD66+Ya66AtvxS/jTvICxDM7n68A6h/X5o2Km ZGUwN7itkAg/0BbQjBgQiR6+PZ41wm8PFls3P5U3uc4qMeyVE87bhMnyyiabg8oQ x7XZ8zMJbikCqLWP386saRHAiYkvSw== =c5q9 -----END PGP SIGNATURE----- --=-=-=--