Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/zephyr/usb/class/usbd_hid.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@
* and the execution time should be quite short.
*/
void (*sof)(const struct device *dev);

void (*suspend)(const struct device *dev);

Check warning on line 182 in include/zephyr/usb/class/usbd_hid.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

include/zephyr/usb/class/usbd_hid.h:182 please, no spaces at the start of a line

Check warning on line 182 in include/zephyr/usb/class/usbd_hid.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SPACE_BEFORE_TAB

include/zephyr/usb/class/usbd_hid.h:182 please, no space before tabs

Check failure on line 182 in include/zephyr/usb/class/usbd_hid.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

CODE_INDENT

include/zephyr/usb/class/usbd_hid.h:182 code indent should use tabs where possible
void (*resume)(const struct device *dev);

Check warning on line 183 in include/zephyr/usb/class/usbd_hid.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

include/zephyr/usb/class/usbd_hid.h:183 please, no spaces at the start of a line

Check warning on line 183 in include/zephyr/usb/class/usbd_hid.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SPACE_BEFORE_TAB

include/zephyr/usb/class/usbd_hid.h:183 please, no space before tabs

Check failure on line 183 in include/zephyr/usb/class/usbd_hid.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

CODE_INDENT

include/zephyr/usb/class/usbd_hid.h:183 code indent should use tabs where possible
};

/**
Expand Down
12 changes: 12 additions & 0 deletions subsys/usb/device_next/class/usbd_hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,15 +474,27 @@
static void usbd_hid_suspended(struct usbd_class_data *const c_data)
{
const struct device *dev = usbd_class_get_private(c_data);
struct hid_device_data *ddata = dev->data;
const struct hid_device_ops *const ops = ddata->ops;

LOG_DBG("Configuration suspended, device %s", dev->name);

if (ops->suspend) {

Check warning on line 482 in subsys/usb/device_next/class/usbd_hid.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SUSPECT_CODE_INDENT

subsys/usb/device_next/class/usbd_hid.c:482 suspect code indent for conditional statements (8, 12)
ops->suspend(dev);
}
}

static void usbd_hid_resumed(struct usbd_class_data *const c_data)
{
const struct device *dev = usbd_class_get_private(c_data);
struct hid_device_data *ddata = dev->data;
const struct hid_device_ops *const ops = ddata->ops;

LOG_DBG("Configuration resumed, device %s", dev->name);

if (ops->resume) {

Check warning on line 495 in subsys/usb/device_next/class/usbd_hid.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SUSPECT_CODE_INDENT

subsys/usb/device_next/class/usbd_hid.c:495 suspect code indent for conditional statements (8, 12)
ops->resume(dev);
}
}

static void *usbd_hid_get_desc(struct usbd_class_data *const c_data,
Expand Down
Loading