/*
  * Static device attribute struct with the sysfs attributes for IR's
  */
-static DEVICE_ATTR(protocols, 0644, show_protocols, store_protocols);
+static struct device_attribute dev_attr_ro_protocols =
+__ATTR(protocols, 0444, show_protocols, NULL);
+static struct device_attribute dev_attr_rw_protocols =
+__ATTR(protocols, 0644, show_protocols, store_protocols);
 static DEVICE_ATTR(wakeup_protocols, 0644, show_wakeup_protocols,
                   store_wakeup_protocols);
 static RC_FILTER_ATTR(filter, S_IRUGO|S_IWUSR,
 static RC_FILTER_ATTR(wakeup_filter_mask, S_IRUGO|S_IWUSR,
                      show_filter, store_filter, RC_FILTER_WAKEUP, true);
 
-static struct attribute *rc_dev_protocol_attrs[] = {
-       &dev_attr_protocols.attr,
+static struct attribute *rc_dev_rw_protocol_attrs[] = {
+       &dev_attr_rw_protocols.attr,
        NULL,
 };
 
-static const struct attribute_group rc_dev_protocol_attr_grp = {
-       .attrs  = rc_dev_protocol_attrs,
+static const struct attribute_group rc_dev_rw_protocol_attr_grp = {
+       .attrs  = rc_dev_rw_protocol_attrs,
+};
+
+static struct attribute *rc_dev_ro_protocol_attrs[] = {
+       &dev_attr_ro_protocols.attr,
+       NULL,
+};
+
+static const struct attribute_group rc_dev_ro_protocol_attr_grp = {
+       .attrs  = rc_dev_ro_protocol_attrs,
 };
 
 static struct attribute *rc_dev_filter_attrs[] = {
        dev_set_drvdata(&dev->dev, dev);
 
        dev->dev.groups = dev->sysfs_groups;
-       if (dev->driver_type != RC_DRIVER_IR_RAW_TX)
-               dev->sysfs_groups[attr++] = &rc_dev_protocol_attr_grp;
+       if (dev->driver_type == RC_DRIVER_SCANCODE && !dev->change_protocol)
+               dev->sysfs_groups[attr++] = &rc_dev_ro_protocol_attr_grp;
+       else if (dev->driver_type != RC_DRIVER_IR_RAW_TX)
+               dev->sysfs_groups[attr++] = &rc_dev_rw_protocol_attr_grp;
        if (dev->s_filter)
                dev->sysfs_groups[attr++] = &rc_dev_filter_attr_grp;
        if (dev->s_wakeup_filter)