Sending gnss data during suspend doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am not able to send data (serdev_device_write(gserial->serdev,
standby_cmd, strlen(standby_cmd), MAX_SCHEDULE_TIMEOUT)) to gnss in
suspend callback (from sta8089_set_power):

static const struct gnss_serial_ops sta8089_gserial_ops = {
.set_power = sta8089_set_power,
};

but it works during prepare. To do this I have to patch the following API:

@@ -21,10 +21,11 @@ struct gnss_serial {
  enum gnss_serial_pm_state {
  GNSS_SERIAL_OFF,
  GNSS_SERIAL_ACTIVE,
  GNSS_SERIAL_STANDBY,
+ GNSS_SERIAL_PREPARE,
 };

 static int gnss_serial_prepare(struct device *dev)
 {
- if (pm_runtime_suspended(dev))
- return 1;
+ struct gnss_serial *gserial = dev_get_drvdata(dev);

- return 0;
+ return gnss_serial_set_power(gserial, GNSS_SERIAL_PREPARE);
 }

Is it normal that sending data during suspend doesn't work?
I think there should be a solution to use prepare without patching
gnss_serial_prepare.
Any ideas please?

Best regards,
Mohamed Ali



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux