• Home
  • Raw
  • Download

Lines Matching refs:state

42 	unsigned long		state;  member
126 if (rfkill->state & RFKILL_BLOCK_ANY) in rfkill_led_trigger_event()
181 if (!(rfkill->state & RFKILL_BLOCK_ANY)) { in rfkill_global_led_trigger_worker()
265 ev->hard = !!(rfkill->state & RFKILL_BLOCK_HW); in rfkill_fill_event()
266 ev->soft = !!(rfkill->state & (RFKILL_BLOCK_SW | in rfkill_fill_event()
326 prev = rfkill->state & RFKILL_BLOCK_SW; in rfkill_set_block()
329 rfkill->state |= RFKILL_BLOCK_SW_PREV; in rfkill_set_block()
331 rfkill->state &= ~RFKILL_BLOCK_SW_PREV; in rfkill_set_block()
334 rfkill->state |= RFKILL_BLOCK_SW; in rfkill_set_block()
336 rfkill->state &= ~RFKILL_BLOCK_SW; in rfkill_set_block()
338 rfkill->state |= RFKILL_BLOCK_SW_SETCALL; in rfkill_set_block()
350 if (rfkill->state & RFKILL_BLOCK_SW_PREV) in rfkill_set_block()
351 rfkill->state |= RFKILL_BLOCK_SW; in rfkill_set_block()
353 rfkill->state &= ~RFKILL_BLOCK_SW; in rfkill_set_block()
355 rfkill->state &= ~RFKILL_BLOCK_SW_SETCALL; in rfkill_set_block()
356 rfkill->state &= ~RFKILL_BLOCK_SW_PREV; in rfkill_set_block()
357 curr = rfkill->state & RFKILL_BLOCK_SW; in rfkill_set_block()
533 prev = !!(rfkill->state & RFKILL_BLOCK_HW); in rfkill_set_hw_state()
535 rfkill->state |= RFKILL_BLOCK_HW; in rfkill_set_hw_state()
537 rfkill->state &= ~RFKILL_BLOCK_HW; in rfkill_set_hw_state()
538 ret = !!(rfkill->state & RFKILL_BLOCK_ANY); in rfkill_set_hw_state()
556 if (rfkill->state & RFKILL_BLOCK_SW_SETCALL) in __rfkill_set_sw_state()
560 rfkill->state |= bit; in __rfkill_set_sw_state()
562 rfkill->state &= ~bit; in __rfkill_set_sw_state()
573 prev = !!(rfkill->state & RFKILL_BLOCK_SW); in rfkill_set_sw_state()
575 hwblock = !!(rfkill->state & RFKILL_BLOCK_HW); in rfkill_set_sw_state()
619 swprev = !!(rfkill->state & RFKILL_BLOCK_SW); in rfkill_set_states()
620 hwprev = !!(rfkill->state & RFKILL_BLOCK_HW); in rfkill_set_states()
623 rfkill->state |= RFKILL_BLOCK_HW; in rfkill_set_states()
625 rfkill->state &= ~RFKILL_BLOCK_HW; in rfkill_set_states()
710 return sprintf(buf, "%d\n", (rfkill->state & RFKILL_BLOCK_HW) ? 1 : 0 ); in hard_show()
719 return sprintf(buf, "%d\n", (rfkill->state & RFKILL_BLOCK_SW) ? 1 : 0 ); in soft_show()
726 unsigned long state; in soft_store() local
732 err = kstrtoul(buf, 0, &state); in soft_store()
736 if (state > 1 ) in soft_store()
740 rfkill_set_block(rfkill, state); in soft_store()
747 static u8 user_state_from_blocked(unsigned long state) in user_state_from_blocked() argument
749 if (state & RFKILL_BLOCK_HW) in user_state_from_blocked()
751 if (state & RFKILL_BLOCK_SW) in user_state_from_blocked()
762 return sprintf(buf, "%d\n", user_state_from_blocked(rfkill->state)); in state_show()
769 unsigned long state; in state_store() local
775 err = kstrtoul(buf, 0, &state); in state_store()
779 if (state != RFKILL_USER_STATE_SOFT_BLOCKED && in state_store()
780 state != RFKILL_USER_STATE_UNBLOCKED) in state_store()
784 rfkill_set_block(rfkill, state == RFKILL_USER_STATE_SOFT_BLOCKED); in state_store()
789 static DEVICE_ATTR_RW(state);
814 u32 state; in rfkill_dev_uevent() local
825 state = rfkill->state; in rfkill_dev_uevent()
828 user_state_from_blocked(state)); in rfkill_dev_uevent()
883 cur = !!(rfkill->state & RFKILL_BLOCK_SW); in rfkill_resume()
911 u32 state; in rfkill_blocked() local
914 state = rfkill->state; in rfkill_blocked()
917 return !!(state & RFKILL_BLOCK_ANY); in rfkill_blocked()
1052 bool soft_blocked = !!(rfkill->state & RFKILL_BLOCK_SW); in rfkill_register()