From: Wolfram Sang <wsa@the-dreams.de>
To: Laine Jaakko EXT <ext-jaakko.laine@vaisala.com>
Cc: "michal.simek@xilinx.com" <michal.simek@xilinx.com>,
Shubhrajyoti Datta <shubhrajyoti.datta@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH] i2c: xiic: Support disabling multi-master in DT
Date: Wed, 1 Apr 2020 16:41:59 +0200 [thread overview]
Message-ID: <20200401143254.GA2409@ninjato> (raw)
In-Reply-To: <AM0PR06MB5185E501349E06428093B62FD4F70@AM0PR06MB5185.eurprd06.prod.outlook.com>
[-- Attachment #1.1: Type: text/plain, Size: 1678 bytes --]
> The multi-master -binding is documented here as boolean and encodes a
> Boolean by either existing or not existing in device tree. It is also
> used in other drivers so I couldn't do much about it missing meaning
> False.
> https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/i2c/i2c.txt
> I originally had a custom device tree entry where the default was for
> multi-master to be enabled before I noticed the pre-existing binding.
>
> Maybe if the multi-master binding was changed from Boolean to for
> example a string property (multi-master = "ON" / multi-master =
> "OFF"), code could still just check the existence with
> "of_property_read_bool()" first, where property missing means "OFF"
> and property existing means "ON"(like before) if there is no text
> associated. Xiic driver would then only disable multimaster, if device
> tree explicitly contains multi-master = "OFF".
>
> This should be able to maintain driver backwards compatibility with
> old device trees, but requires binding documentation change and all
> drivers should likely be updated to also accept the new style of
> multi-master property to be consistent. This is also not as clean as
> the old Boolean property in my opinion.
I agree. I don't want to change the old "multi-master" binding like
above because that would be quite intrusive for other drivers and
confusing when trying to understand the binding.
My best bet is to introduce another binding "single-master" which says
clearly that we are the only bus master on that bus.
Both bindings missing means then "unclear".
I think this matches reality best.
Opinions?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-04-01 14:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 13:58 [PATCH] i2c: xiic: Support disabling multi-master in DT Laine Jaakko EXT
2020-02-24 10:13 ` Michal Simek
2020-02-25 14:08 ` Laine Jaakko EXT
2020-02-25 14:13 ` Wolfram Sang
2020-02-25 14:27 ` Laine Jaakko EXT
2020-02-25 14:32 ` Wolfram Sang
2020-02-25 14:37 ` Michal Simek
2020-02-25 14:41 ` Wolfram Sang
2020-02-25 14:44 ` Michal Simek
2020-02-25 14:48 ` Wolfram Sang
2020-02-25 14:49 ` Michal Simek
2020-03-18 12:20 ` Shubhrajyoti Datta
2020-03-18 16:49 ` Laine Jaakko EXT
2020-03-19 9:34 ` Shubhrajyoti Datta
2020-03-19 10:26 ` Laine Jaakko EXT
2020-04-16 10:42 ` Laine Jaakko EXT
2020-04-01 14:41 ` Wolfram Sang [this message]
2020-04-02 6:16 ` Laine Jaakko EXT
2020-04-02 9:28 ` Wolfram Sang
2020-05-04 12:58 ` Laine Jaakko EXT
2020-05-27 11:07 ` Wolfram Sang
2020-05-27 11:27 ` Laine Jaakko EXT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200401143254.GA2409@ninjato \
--to=wsa@the-dreams.de \
--cc=ext-jaakko.laine@vaisala.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=shubhrajyoti.datta@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).