Lines Matching refs:pk
53 struct pk_device *pk; member
103 struct pk_device *pk = hid_get_drvdata(hdev); in show_channel() local
105 dbg_hid("pcmidi sysfs read channel=%u\n", pk->pm->midi_channel); in show_channel()
107 return sprintf(buf, "%u (min:%u, max:%u)\n", pk->pm->midi_channel, in show_channel()
116 struct pk_device *pk = hid_get_drvdata(hdev); in store_channel() local
122 pk->pm->midi_channel = channel; in store_channel()
140 struct pk_device *pk = hid_get_drvdata(hdev); in show_sustain() local
142 dbg_hid("pcmidi sysfs read sustain=%u\n", pk->pm->midi_sustain); in show_sustain()
144 return sprintf(buf, "%u (off:%u, max:%u (ms))\n", pk->pm->midi_sustain, in show_sustain()
153 struct pk_device *pk = hid_get_drvdata(hdev); in store_sustain() local
159 pk->pm->midi_sustain = sustain; in store_sustain()
160 pk->pm->midi_sustain_mode = in store_sustain()
161 (0 == sustain || !pk->pm->midi_mode) ? 0 : 1; in store_sustain()
179 struct pk_device *pk = hid_get_drvdata(hdev); in show_octave() local
181 dbg_hid("pcmidi sysfs read octave=%d\n", pk->pm->midi_octave); in show_octave()
183 return sprintf(buf, "%d (min:%d, max:%d)\n", pk->pm->midi_octave, in show_octave()
192 struct pk_device *pk = hid_get_drvdata(hdev); in store_octave() local
199 pk->pm->midi_octave = octave; in store_octave()
273 struct hid_device *hdev = pm->pk->hdev; in pcmidi_get_output_report()
298 struct hid_device *hdev = pm->pk->hdev; in pcmidi_submit_output_report()
625 err = snd_card_new(&pm->pk->hdev->dev, index[dev], id[dev], in pcmidi_snd_initialise()
663 err = device_create_file(&pm->pk->hdev->dev, in pcmidi_snd_initialise()
671 err = device_create_file(&pm->pk->hdev->dev, in pcmidi_snd_initialise()
679 err = device_create_file(&pm->pk->hdev->dev, in pcmidi_snd_initialise()
709 device_remove_file(&pm->pk->hdev->dev, sysfs_device_attr_octave); in pcmidi_snd_initialise()
711 device_remove_file(&pm->pk->hdev->dev, sysfs_device_attr_sustain); in pcmidi_snd_initialise()
713 device_remove_file(&pm->pk->hdev->dev, sysfs_device_attr_channel); in pcmidi_snd_initialise()
727 device_remove_file(&pm->pk->hdev->dev, in pcmidi_snd_terminate()
729 device_remove_file(&pm->pk->hdev->dev, in pcmidi_snd_terminate()
731 device_remove_file(&pm->pk->hdev->dev, in pcmidi_snd_terminate()
762 struct pk_device *pk = hid_get_drvdata(hdev); in pk_input_mapping() local
765 pm = pk->pm; in pk_input_mapping()
780 struct pk_device *pk = hid_get_drvdata(hdev); in pk_raw_event() local
783 if (1 == pk->pm->ifnum) { in pk_raw_event()
789 ret = pcmidi_handle_report(pk->pm, in pk_raw_event()
804 struct pk_device *pk; in pk_probe() local
813 pk = kzalloc(sizeof(*pk), GFP_KERNEL); in pk_probe()
814 if (pk == NULL) { in pk_probe()
819 pk->hdev = hdev; in pk_probe()
828 pm->pk = pk; in pk_probe()
829 pk->pm = pm; in pk_probe()
832 hid_set_drvdata(hdev, pk); in pk_probe()
860 kfree(pk); in pk_probe()
867 struct pk_device *pk = hid_get_drvdata(hdev); in pk_remove() local
870 pm = pk->pm; in pk_remove()
878 kfree(pk); in pk_remove()