X86 platform drivers
 help / color / mirror / Atom feed
From: Maximilian Luz <luzmaximilian@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Maximilian Luz <luzmaximilian@gmail.com>,
	Mark Gross <markgross@kernel.org>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/9] platform/surface: aggregator_tabletsw: Use target-ID enum instead of hard-coding values
Date: Fri,  2 Dec 2022 23:33:23 +0100	[thread overview]
Message-ID: <20221202223327.690880-6-luzmaximilian@gmail.com> (raw)
In-Reply-To: <20221202223327.690880-1-luzmaximilian@gmail.com>

Instead of hard-coding the target ID, use the respective enum
ssam_ssh_tid value.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
---
 drivers/platform/surface/surface_aggregator_tabletsw.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/surface/surface_aggregator_tabletsw.c b/drivers/platform/surface/surface_aggregator_tabletsw.c
index 27d95a6a7851..bd8cd453c393 100644
--- a/drivers/platform/surface/surface_aggregator_tabletsw.c
+++ b/drivers/platform/surface/surface_aggregator_tabletsw.c
@@ -247,7 +247,7 @@ static bool ssam_kip_cover_state_is_tablet_mode(struct ssam_tablet_sw *sw, u32 s
 
 SSAM_DEFINE_SYNC_REQUEST_R(__ssam_kip_get_cover_state, u8, {
 	.target_category = SSAM_SSH_TC_KIP,
-	.target_id       = 0x01,
+	.target_id       = SSAM_SSH_TID_SAM,
 	.command_id      = 0x1d,
 	.instance_id     = 0x00,
 });
@@ -371,7 +371,7 @@ static int ssam_pos_get_sources_list(struct ssam_tablet_sw *sw, struct ssam_sour
 	int status;
 
 	rqst.target_category = SSAM_SSH_TC_POS;
-	rqst.target_id = 0x01;
+	rqst.target_id = SSAM_SSH_TID_SAM;
 	rqst.command_id = 0x01;
 	rqst.instance_id = 0x00;
 	rqst.flags = SSAM_REQUEST_HAS_RESPONSE;
@@ -430,7 +430,7 @@ static int ssam_pos_get_source(struct ssam_tablet_sw *sw, u32 *source_id)
 
 SSAM_DEFINE_SYNC_REQUEST_WR(__ssam_pos_get_posture_for_source, __le32, __le32, {
 	.target_category = SSAM_SSH_TC_POS,
-	.target_id       = 0x01,
+	.target_id       = SSAM_SSH_TID_SAM,
 	.command_id      = 0x02,
 	.instance_id     = 0x00,
 });
-- 
2.38.1


  parent reply	other threads:[~2022-12-02 22:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 22:33 [PATCH 0/9] platform/surface: aggregator: Improve target/source handling in SSH messages Maximilian Luz
2022-12-02 22:33 ` [PATCH 1/9] platform/surface: aggregator: Ignore command messages not intended for us Maximilian Luz
2023-01-12 18:12   ` Hans de Goede
2022-12-02 22:33 ` [PATCH 2/9] platform/surface: aggregator: Improve documentation and handling of message target and source IDs Maximilian Luz
2022-12-02 22:33 ` [PATCH 3/9] platform/surface: aggregator: Add target and source IDs to command trace events Maximilian Luz
2022-12-02 22:33 ` [PATCH 4/9] platform/surface: aggregator_hub: Use target-ID enum instead of hard-coding values Maximilian Luz
2022-12-02 22:33 ` Maximilian Luz [this message]
2022-12-02 22:33 ` [PATCH 6/9] platform/surface: dtx: " Maximilian Luz
2022-12-02 22:33 ` [PATCH 7/9] HID: surface-hid: " Maximilian Luz
2022-12-02 22:33 ` [PATCH 8/9] platform/surface: aggregator: Enforce use of target-ID enum in device ID macros Maximilian Luz
2022-12-03  0:41   ` Sebastian Reichel
2022-12-02 22:33 ` [PATCH 9/9] platform/surface: aggregator_registry: Fix target-ID of base-hub Maximilian Luz
2022-12-08 16:03 ` [PATCH 0/9] platform/surface: aggregator: Improve target/source handling in SSH messages Hans de Goede
2022-12-08 16:18   ` Maximilian Luz
2022-12-08 16:24   ` Benjamin Tissoires
2022-12-08 16:38     ` Hans de Goede
2022-12-08 16:48     ` Maximilian Luz
2022-12-08 18:25       ` Benjamin Tissoires
2023-01-23 15:37 ` Hans de Goede

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=20221202223327.690880-6-luzmaximilian@gmail.com \
    --to=luzmaximilian@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /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