11 #include <linux/module.h>
14 #include <linux/kernel.h>
15 #include <linux/string.h>
17 #include <linux/errno.h>
24 #include <linux/device.h>
34 #define to_socket(_dev) container_of(_dev, struct pcmcia_socket, dev)
44 return sprintf(buf,
"32-bit\n");
45 return sprintf(buf,
"16-bit\n");
85 const char *buf,
size_t count)
107 static ssize_t pccard_store_card_pm_state(
struct device *dev,
109 const char *buf,
size_t count)
128 static DEVICE_ATTR(card_pm_state, 0644, pccard_show_card_pm_state, pccard_store_card_pm_state);
132 const char *buf,
size_t count)
156 const char *buf,
size_t count)
165 ret =
sscanf(buf,
"0x%x\n", &mask);
174 return ret ? ret :
count;
176 static DEVICE_ATTR(card_irq_mask, 0600, pccard_show_irq_mask, pccard_store_irq_mask);
188 const char *buf,
size_t count)
204 static DEVICE_ATTR(available_resources_setup_done, 0600, pccard_show_resource, pccard_store_resource);
206 static struct attribute *pccard_socket_attributes[] = {
207 &dev_attr_card_type.attr,
208 &dev_attr_card_voltage.attr,
209 &dev_attr_card_vpp.attr,
210 &dev_attr_card_vcc.attr,
211 &dev_attr_card_insert.attr,
212 &dev_attr_card_pm_state.attr,
213 &dev_attr_card_eject.attr,
214 &dev_attr_card_irq_mask.attr,
215 &dev_attr_available_resources_setup_done.attr,
220 .attrs = pccard_socket_attributes,