All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Scally <djrscally@gmail.com>
To: "Fabian Wüthrich" <me@fabwu.ch>, linux-media@vger.kernel.org
Cc: Yong Zhi <yong.zhi@intel.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Bingbu Cao <bingbu.cao@intel.com>,
	Tianshu Qiu <tian.shu.qiu@intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH] ipu3-cio2: Parse sensor orientation and rotation
Date: Mon, 29 Mar 2021 21:47:49 +0100	[thread overview]
Message-ID: <77ca125d-f603-af81-b1df-99c71e62d777@gmail.com> (raw)
In-Reply-To: <abe2dd5f-7854-091c-9871-4aa11e5d8b28@fabwu.ch>

Hi Fabian - sorry for the late reply.

On 22/03/2021 15:16, Fabian Wüthrich wrote:
>>> +#define CIO2_SENSOR_ROTATION_NORMAL		0
>>> +#define CIO2_SENSOR_ROTATION_INVERTED		1
>>> +
>>
>> I think these are good here but...
>>
>>> +/* Panel position defined in _PLD section of ACPI Specification 6.3 */
>>> +#define CIO2_PLD_PANEL_TOP			0
>>> +#define CIO2_PLD_PANEL_BOTTOM			1
>>> +#define CIO2_PLD_PANEL_LEFT			2
>>> +#define CIO2_PLD_PANEL_RIGHT			3
>>> +#define CIO2_PLD_PANEL_FRONT			4
>>> +#define CIO2_PLD_PANEL_BACK			5
>>> +#define CIO2_PLD_PANEL_UNKNOWN			6
>>> +
>>
>> ...I wonder if these ought to go somewhere in the include/acpi headers.
>> You might be the only person to refer to pld->panel in driver code (at
>> least a quick grep doesn't show me another one, and only another couple
>> of uses of pld at all) so it's probably not a big deal, but it just
>> feels slightly the wrong place. What do you think?
>>
> I agree. What about include/acpi/acbuffer.h? But I don't know if this
> hinders the acceptance of this patch.


Yeah I think that's probably the right place. I don't think this is a
blocker no, but you'll need to do a v2 anyway to extend the array below,
so you could include another patch then.

>
>>>  #define CIO2_SENSOR_CONFIG(_HID, _NR, ...)	\
>>>  	(const struct cio2_sensor_config) {	\
>>>  		.hid = _HID,			\
>>> @@ -80,6 +93,7 @@ struct cio2_sensor_ssdb {
>>>  struct cio2_property_names {
>>>  	char clock_frequency[16];
>>>  	char rotation[9];
>>> +	char orientation[12];
>>>  	char bus_type[9];
>>>  	char data_lanes[11];
>>>  	char remote_endpoint[16];
>>> @@ -106,6 +120,8 @@ struct cio2_sensor {
>>>  	struct cio2_node_names node_names;
>>>  
>>>  	struct cio2_sensor_ssdb ssdb;
>>> +	struct acpi_pld_info *pld;
>>> +
>>>  	struct cio2_property_names prop_names;
>>>  	struct property_entry ep_properties[5];
>>>  	struct property_entry dev_properties[3];
>>
>> You should extend dev_properties to 4 members; there needs to be an
>> empty entry as a terminator or it'll be a problem in the event someone
>> tries to access a property that isn't there.
>>
> Good catch. Thanks I missed that.

  reply	other threads:[~2021-03-29 20:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-21 19:11 [PATCH] ipu3-cio2: Parse sensor orientation and rotation Fabian Wüthrich
2021-03-22  0:19 ` Daniel Scally
2021-03-22 15:16   ` Fabian Wüthrich
2021-03-29 20:47     ` Daniel Scally [this message]
2021-04-07  8:22 ` Jacopo Mondi
2021-04-07 11:52   ` Fabian Wüthrich
2021-04-07 12:41     ` Jacopo Mondi
2021-04-07 13:19       ` Fabian Wüthrich
2021-04-07 13:51         ` Daniel Scally
2021-04-07 15:27           ` Fabian Wüthrich
2021-04-13  6:34         ` [PATCH v2] " Fabian Wüthrich
2021-04-13 15:15           ` Andy Shevchenko
2021-04-13 15:15             ` [Devel] " Andy Shevchenko
2021-04-14  8:30           ` [PATCH v3 0/2] " Fabian Wüthrich
2021-04-14  8:30             ` [PATCH v3 1/2] ACPI: Add _PLD panel positions Fabian Wüthrich
2021-04-14 13:50               ` Rafael J. Wysocki
2021-04-14 13:50                 ` [Devel] " Rafael J. Wysocki
2021-05-09 16:29                 ` Fabian Wüthrich
2021-05-14 17:32                   ` Kaneda, Erik
2021-04-14  8:30             ` [PATCH v3 2/2] ipu3-cio2: Parse sensor orientation and rotation Fabian Wüthrich
2021-05-09 16:30               ` Fabian Wüthrich
2021-07-12  9:03               ` [PATCH v4] " Fabian Wüthrich
2021-08-20 13:12                 ` Sakari Ailus
2021-08-20 13:25                   ` Andy Shevchenko
2021-08-20 15:02                     ` Sakari Ailus
2021-08-20 15:12                       ` Andy Shevchenko

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=77ca125d-f603-af81-b1df-99c71e62d777@gmail.com \
    --to=djrscally@gmail.com \
    --cc=bingbu.cao@intel.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=me@fabwu.ch \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tian.shu.qiu@intel.com \
    --cc=yong.zhi@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.