Mario Limonciello <[email protected]> writes: Hello Mario,
> Expose SSD130x contrast through the connector LUMINANCE property when > DRM_LUMINANCE is enabled. Program contrast directly and retain the > backlight class interface otherwise. > > Signed-off-by: Mario Limonciello <[email protected]> > --- [...] > struct ssd130x_device *ssd130x_probe(struct device *dev, struct regmap > *regmap) > { > struct ssd130x_device *ssd130x; > +#ifndef CONFIG_DRM_LUMINANCE > struct backlight_device *bl; > +#endif [...] > +#ifndef CONFIG_DRM_LUMINANCE > bl = devm_backlight_device_register(dev, dev_name(dev), dev, ssd130x, > > &ssd130xfb_bl_ops[ssd130x->device_info->family_id], > NULL); > @@ -2258,6 +2298,7 @@ struct ssd130x_device *ssd130x_probe(struct device > *dev, struct regmap *regmap) > bl->props.brightness = ssd130x->contrast; > bl->props.max_brightness = MAX_CONTRAST; > ssd130x->bl_dev = bl; > +#endif I think that IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) makes more sense? Other than that, the patch looks good to me. Reviewed-by: Javier Martinez Canillas <[email protected]> -- Best regards, Javier Martinez Canillas Core Platforms Red Hat
