Lines Matching defs:state

208  * @attr_state:		"state" sysfs entry
297 return !!(edev->state & BIT(index));
303 int state = !!(edev->state & BIT(index));
304 return (state != new_state);
375 return sysfs_emit(buf, "%u\n", edev->state);
380 !!(edev->state & BIT(i)));
385 static DEVICE_ATTR_RO(state);
420 * extcon_sync() - Synchronize the state for an external connector.
425 * the state and property of an external connector.
438 int state;
449 state = !!(edev->state & BIT(index));
456 raw_notifier_call_chain(&edev->nh[index], state, edev);
462 raw_notifier_call_chain(&edev->nh_all, state, edev);
504 * extcon_get_state() - Get the state of an external connector.
512 int index, state;
523 state = is_extcon_attached(edev, index);
526 return state;
531 * extcon_set_state() - Set the state of an external connector.
534 * @state: the new state of an external connector.
537 * Note that this function set the state of an external connector without
538 * a notification. To synchronize the state of an external connector,
543 int extcon_set_state(struct extcon_dev *edev, unsigned int id, bool state)
557 /* Check whether the external connector's state is changed. */
558 if (!is_extcon_changed(edev, index, state))
562 (edev->state & ~BIT(index)) | (state & BIT(index)))) {
569 * the detached state for an external connector.
571 if (!state)
574 /* Update the state for an external connector. */
575 if (state)
576 edev->state |= BIT(index);
578 edev->state &= ~(BIT(index));
587 * extcon_set_state_sync() - Set the state of an external connector with sync.
590 * @state: the new state of external connector.
593 * Note that this function set the state of external connector
594 * and synchronize the state by sending a notification.
598 int extcon_set_state_sync(struct extcon_dev *edev, unsigned int id, bool state)
602 ret = extcon_set_state(edev, id, state);
618 * the external connector should be attached. If detached state, function
824 * bitmap which mean the available state of the property.
902 * any state changes from the extcon.
908 * the current state of an external connector and the third pameter
969 * the state change of all supported external connectors from extcon device.
971 * the current state and the third pameter is the pointer of extcon device.
1134 cable->attr_state.attr.name = "state";
1312 edev->state = 0;