linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Lixu <lixu.zhang@intel.com>
To: linux-input@vger.kernel.org, srinivas.pandruvada@linux.intel.com,
	jikos@kernel.org, benjamin.tissoires@redhat.com
Cc: lixu.zhang@intel.com
Subject: [PATCH v2 1/6] HID: intel-ish-hid: Add ishtp_get_connection_state() interface
Date: Fri, 17 Oct 2025 10:22:13 +0800	[thread overview]
Message-ID: <20251017022218.1292451-2-lixu.zhang@intel.com> (raw)
In-Reply-To: <20251017022218.1292451-1-lixu.zhang@intel.com>

Add the ishtp_get_connection_state() function for struct ishtp_cl, allowing
ishtp client drivers to retrieve the current connection state.

Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 drivers/hid/intel-ish-hid/ishtp/client.c | 6 ++++++
 include/linux/intel-ish-client-if.h      | 1 +
 2 files changed, 7 insertions(+)

diff --git a/drivers/hid/intel-ish-hid/ishtp/client.c b/drivers/hid/intel-ish-hid/ishtp/client.c
index 21a2c0773cc2..40f510b1c072 100644
--- a/drivers/hid/intel-ish-hid/ishtp/client.c
+++ b/drivers/hid/intel-ish-hid/ishtp/client.c
@@ -1261,6 +1261,12 @@ void ishtp_set_connection_state(struct ishtp_cl *cl, int state)
 }
 EXPORT_SYMBOL(ishtp_set_connection_state);
 
+int ishtp_get_connection_state(struct ishtp_cl *cl)
+{
+	return cl->state;
+}
+EXPORT_SYMBOL(ishtp_get_connection_state);
+
 void ishtp_cl_set_fw_client_id(struct ishtp_cl *cl, int fw_client_id)
 {
 	cl->fw_client_id = fw_client_id;
diff --git a/include/linux/intel-ish-client-if.h b/include/linux/intel-ish-client-if.h
index b235fd84f478..2cd4f65aaa37 100644
--- a/include/linux/intel-ish-client-if.h
+++ b/include/linux/intel-ish-client-if.h
@@ -109,6 +109,7 @@ struct ishtp_device *ishtp_get_ishtp_device(struct ishtp_cl *cl);
 void ishtp_set_tx_ring_size(struct ishtp_cl *cl, int size);
 void ishtp_set_rx_ring_size(struct ishtp_cl *cl, int size);
 void ishtp_set_connection_state(struct ishtp_cl *cl, int state);
+int ishtp_get_connection_state(struct ishtp_cl *cl);
 void ishtp_cl_set_fw_client_id(struct ishtp_cl *cl, int fw_client_id);
 
 void ishtp_put_device(struct ishtp_cl_device *cl_dev);
-- 
2.43.0


  reply	other threads:[~2025-10-17  2:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17  2:22 [PATCH v2 0/6] HID: intel-ish-hid: Various power management improvements for hibernation Zhang Lixu
2025-10-17  2:22 ` Zhang Lixu [this message]
2025-10-17  2:22 ` [PATCH v2 2/6] HID: intel-ishtp-hid: Clear suspended flag only after connected on resume Zhang Lixu
2025-10-17  2:22 ` [PATCH v2 3/6] HID: intel-ish-ipc: Reset clients state on resume from D3 Zhang Lixu
2025-10-17  2:22 ` [PATCH v2 4/6] HID: intel-ish-hid: ipc: Always schedule FW reset work on RESET_NOTIFY/ACK Zhang Lixu
2025-10-17  2:22 ` [PATCH v2 5/6] HID: intel-ish-hid: Use IPC RESET instead of void message in ish_wakeup() Zhang Lixu
2025-10-17  2:22 ` [PATCH v2 6/6] HID: intel-ish-hid: ipc: Separate hibernate callbacks in dev_pm_ops Zhang Lixu
2025-10-17 15:48 ` [PATCH v2 0/6] HID: intel-ish-hid: Various power management improvements for hibernation Jiri Kosina

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=20251017022218.1292451-2-lixu.zhang@intel.com \
    --to=lixu.zhang@intel.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.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 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).