All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] HID: intel_ish-hid: HBM: Use connected standby state bit during suspend/resume
@ 2021-03-16 20:23 Srinivas Pandruvada
  2021-03-19 13:35 ` Jiri Kosina
  0 siblings, 1 reply; 5+ messages in thread
From: Srinivas Pandruvada @ 2021-03-16 20:23 UTC (permalink / raw)
  To: jikos, benjamin.tissoires, srinivas.pandruvada
  Cc: linux-input, linux-kernel, Ye Xiang

From: Ye Xiang <xiang.ye@intel.com>

The individual sensor drivers implemented in the ISH firmware needs
capability to take special actions when there is a change in the system
standby state. The ISH core firmware passes this notification to
individual sensor drivers in response to the OS request via connected
standby bit in the SYSTEM_STATE_STATUS command.

This change sets CONNECTED_STANDBY_STATE_BIT bit to 1 during suspend
callback and clears during resume callback.

Signed-off-by: Ye Xiang <xiang.ye@intel.com>
[srinivas.pandruvada@linux.intel.com: changelog rewrite]
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
v2:
	changed changelog to be more clear
	Changed the name in the signed-off to match "From"

 drivers/hid/intel-ish-hid/ishtp/hbm.c | 6 +++---
 drivers/hid/intel-ish-hid/ishtp/hbm.h | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/intel-ish-hid/ishtp/hbm.c b/drivers/hid/intel-ish-hid/ishtp/hbm.c
index 30a91d068306..dbfae60f2621 100644
--- a/drivers/hid/intel-ish-hid/ishtp/hbm.c
+++ b/drivers/hid/intel-ish-hid/ishtp/hbm.c
@@ -914,7 +914,7 @@ static inline void fix_cl_hdr(struct ishtp_msg_hdr *hdr, size_t length,
 /*** Suspend and resume notification ***/
 
 static uint32_t current_state;
-static uint32_t supported_states = 0 | SUSPEND_STATE_BIT;
+static uint32_t supported_states = SUSPEND_STATE_BIT | CONNECTED_STANDBY_STATE_BIT;
 
 /**
  * ishtp_send_suspend() - Send suspend message to FW
@@ -933,7 +933,7 @@ void ishtp_send_suspend(struct ishtp_device *dev)
 	memset(&state_status_msg, 0, len);
 	state_status_msg.hdr.cmd = SYSTEM_STATE_STATUS;
 	state_status_msg.supported_states = supported_states;
-	current_state |= SUSPEND_STATE_BIT;
+	current_state |= (SUSPEND_STATE_BIT | CONNECTED_STANDBY_STATE_BIT);
 	dev->print_log(dev, "%s() sends SUSPEND notification\n", __func__);
 	state_status_msg.states_status = current_state;
 
@@ -959,7 +959,7 @@ void ishtp_send_resume(struct ishtp_device *dev)
 	memset(&state_status_msg, 0, len);
 	state_status_msg.hdr.cmd = SYSTEM_STATE_STATUS;
 	state_status_msg.supported_states = supported_states;
-	current_state &= ~SUSPEND_STATE_BIT;
+	current_state &= ~(CONNECTED_STANDBY_STATE_BIT | SUSPEND_STATE_BIT);
 	dev->print_log(dev, "%s() sends RESUME notification\n", __func__);
 	state_status_msg.states_status = current_state;
 
diff --git a/drivers/hid/intel-ish-hid/ishtp/hbm.h b/drivers/hid/intel-ish-hid/ishtp/hbm.h
index 7c445b203f2a..08f3f3ceb18c 100644
--- a/drivers/hid/intel-ish-hid/ishtp/hbm.h
+++ b/drivers/hid/intel-ish-hid/ishtp/hbm.h
@@ -235,6 +235,7 @@ struct dma_xfer_hbm {
 #define SYSTEM_STATE_QUERY_SUBSCRIBERS		0x3
 #define SYSTEM_STATE_STATE_CHANGE_REQ		0x4
 /*indicates suspend and resume states*/
+#define CONNECTED_STANDBY_STATE_BIT		(1<<0)
 #define SUSPEND_STATE_BIT			(1<<1)
 
 struct ish_system_states_header {
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] HID: intel_ish-hid: HBM: Use connected standby state bit during suspend/resume
  2021-03-16 20:23 [PATCH v2] HID: intel_ish-hid: HBM: Use connected standby state bit during suspend/resume Srinivas Pandruvada
@ 2021-03-19 13:35 ` Jiri Kosina
  2021-05-17 11:27   ` Srinivas Pandruvada
  2021-05-26 13:45   ` Srinivas Pandruvada
  0 siblings, 2 replies; 5+ messages in thread
From: Jiri Kosina @ 2021-03-19 13:35 UTC (permalink / raw)
  To: Srinivas Pandruvada
  Cc: benjamin.tissoires, linux-input, linux-kernel, Ye Xiang

On Tue, 16 Mar 2021, Srinivas Pandruvada wrote:

> From: Ye Xiang <xiang.ye@intel.com>
> 
> The individual sensor drivers implemented in the ISH firmware needs
> capability to take special actions when there is a change in the system
> standby state. The ISH core firmware passes this notification to
> individual sensor drivers in response to the OS request via connected
> standby bit in the SYSTEM_STATE_STATUS command.
> 
> This change sets CONNECTED_STANDBY_STATE_BIT bit to 1 during suspend
> callback and clears during resume callback.
> 
> Signed-off-by: Ye Xiang <xiang.ye@intel.com>
> [srinivas.pandruvada@linux.intel.com: changelog rewrite]
> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> v2:
> 	changed changelog to be more clear
> 	Changed the name in the signed-off to match "From"
> 
>  drivers/hid/intel-ish-hid/ishtp/hbm.c | 6 +++---
>  drivers/hid/intel-ish-hid/ishtp/hbm.h | 1 +
>  2 files changed, 4 insertions(+), 3 deletions(-)

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] HID: intel_ish-hid: HBM: Use connected standby state bit during suspend/resume
  2021-03-19 13:35 ` Jiri Kosina
@ 2021-05-17 11:27   ` Srinivas Pandruvada
  2021-05-26 13:45   ` Srinivas Pandruvada
  1 sibling, 0 replies; 5+ messages in thread
From: Srinivas Pandruvada @ 2021-05-17 11:27 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: benjamin.tissoires, linux-input, linux-kernel, Ye Xiang

Hi Jiri,

On Fri, 2021-03-19 at 14:35 +0100, Jiri Kosina wrote:
> On Tue, 16 Mar 2021, Srinivas Pandruvada wrote:
> 
> > From: Ye Xiang <xiang.ye@intel.com>
> > 
> > The individual sensor drivers implemented in the ISH firmware needs
> > capability to take special actions when there is a change in the
> > system
> > standby state. The ISH core firmware passes this notification to
> > individual sensor drivers in response to the OS request via
> > connected
> > standby bit in the SYSTEM_STATE_STATUS command.
> > 
> > This change sets CONNECTED_STANDBY_STATE_BIT bit to 1 during
> > suspend
> > callback and clears during resume callback.
> > 
> > Signed-off-by: Ye Xiang <xiang.ye@intel.com>
> > [srinivas.pandruvada@linux.intel.com: changelog rewrite]
> > Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> > ---
> > v2:
> >         changed changelog to be more clear
> >         Changed the name in the signed-off to match "From"
> > 
> >  drivers/hid/intel-ish-hid/ishtp/hbm.c | 6 +++---
> >  drivers/hid/intel-ish-hid/ishtp/hbm.h | 1 +
> >  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> Applied, thanks.

I was looking for this patch in 5.13-rc2. It is not there, Is there
some pull request pending?

Thanks,
Srinivas 


> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] HID: intel_ish-hid: HBM: Use connected standby state bit during suspend/resume
  2021-03-19 13:35 ` Jiri Kosina
  2021-05-17 11:27   ` Srinivas Pandruvada
@ 2021-05-26 13:45   ` Srinivas Pandruvada
  2021-05-26 14:45     ` Jiri Kosina
  1 sibling, 1 reply; 5+ messages in thread
From: Srinivas Pandruvada @ 2021-05-26 13:45 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: benjamin.tissoires, linux-input, linux-kernel, Ye Xiang

Hi Jiri,

On Fri, 2021-03-19 at 14:35 +0100, Jiri Kosina wrote:
> On Tue, 16 Mar 2021, Srinivas Pandruvada wrote:
> 
> > From: Ye Xiang <xiang.ye@intel.com>
> > 
> > The individual sensor drivers implemented in the ISH firmware needs
> > capability to take special actions when there is a change in the
> > system
> > standby state. The ISH core firmware passes this notification to
> > individual sensor drivers in response to the OS request via
> > connected
> > standby bit in the SYSTEM_STATE_STATUS command.
> > 
> > This change sets CONNECTED_STANDBY_STATE_BIT bit to 1 during
> > suspend
> > callback and clears during resume callback.
> > 
> > Signed-off-by: Ye Xiang <xiang.ye@intel.com>
> > [srinivas.pandruvada@linux.intel.com: changelog rewrite]
> > Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> > ---
> > v2:
> > 	changed changelog to be more clear
> > 	Changed the name in the signed-off to match "From"
> > 
> >  drivers/hid/intel-ish-hid/ishtp/hbm.c | 6 +++---
> >  drivers/hid/intel-ish-hid/ishtp/hbm.h | 1 +
> >  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> Applied, thanks.

I don't see this patch in 5.13-rc3. But I see in linux-next. There are
other patches here which didn't make to 5.13-rc.

I see them in
https://kernel.googlesource.com/pub/scm/linux/kernel/git/hid/hid/+/refs/heads/for-5.13/intel-ish

Did you decide to postpone for 5.14? It will be fine to postpone.


Thanks,
Srinivas
 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] HID: intel_ish-hid: HBM: Use connected standby state bit during suspend/resume
  2021-05-26 13:45   ` Srinivas Pandruvada
@ 2021-05-26 14:45     ` Jiri Kosina
  0 siblings, 0 replies; 5+ messages in thread
From: Jiri Kosina @ 2021-05-26 14:45 UTC (permalink / raw)
  To: Srinivas Pandruvada
  Cc: benjamin.tissoires, linux-input, linux-kernel, Ye Xiang

On Wed, 26 May 2021, Srinivas Pandruvada wrote:

> > > The individual sensor drivers implemented in the ISH firmware needs 
> > > capability to take special actions when there is a change in the 
> > > system standby state. The ISH core firmware passes this notification 
> > > to individual sensor drivers in response to the OS request via 
> > > connected standby bit in the SYSTEM_STATE_STATUS command.
> > > 
> > > This change sets CONNECTED_STANDBY_STATE_BIT bit to 1 during
> > > suspend
> > > callback and clears during resume callback.
> > > 
> > > Signed-off-by: Ye Xiang <xiang.ye@intel.com>
> > > [srinivas.pandruvada@linux.intel.com: changelog rewrite]
> > > Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> > > ---
> > > v2:
> > > 	changed changelog to be more clear
> > > 	Changed the name in the signed-off to match "From"
> > > 
> > >  drivers/hid/intel-ish-hid/ishtp/hbm.c | 6 +++---
> > >  drivers/hid/intel-ish-hid/ishtp/hbm.h | 1 +
> > >  2 files changed, 4 insertions(+), 3 deletions(-)
> > 
> > Applied, thanks.
> 
> I don't see this patch in 5.13-rc3. But I see in linux-next. There are
> other patches here which didn't make to 5.13-rc.
> 
> I see them in
> https://kernel.googlesource.com/pub/scm/linux/kernel/git/hid/hid/+/refs/heads/for-5.13/intel-ish
> 
> Did you decide to postpone for 5.14? 

Uwe Kleine-Koening already noticed this:

	http://lore.kernel.org/r/nycvar.YFH.7.76.2105131318120.28378@cbobk.fhfr.pm

I apologize for the hassle. 

> It will be fine to postpone.

Thanks. It's currently in for-5.14/intel-ish.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-26 14:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 20:23 [PATCH v2] HID: intel_ish-hid: HBM: Use connected standby state bit during suspend/resume Srinivas Pandruvada
2021-03-19 13:35 ` Jiri Kosina
2021-05-17 11:27   ` Srinivas Pandruvada
2021-05-26 13:45   ` Srinivas Pandruvada
2021-05-26 14:45     ` Jiri Kosina

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.