/* * The CDS9K currently lives on an SPI bus, and comprises different IP blocks * in different applications. For this reason the top level driver does nothing * more than expose a regmap on top of its parent bus. * As children of this top-level cds9k driver, each copy of each IP block has * an entry in the DT for it, and a separate driver is registered for each * * The sample DTS segment here exposes a CDS9K loaded with at least the * following IP blocks: * * address | IP block | compatible * --------+-------------+--------- * 0x4 | Fan control | david,cds9k-fan * 0x6 | LED control | david,cds9k-led * 0x8 | GPIO | david,cds9k-gpio * 0xa | GPIO | david,cds9k-gpio */ &spi0 { // ... cds9k: cds9k@0 { compatible = "david,cds9k"; status = "okay"; reg = <0>; spi-max-frequency = <1000000>; #address-cells = <1>; #size-cells = <0>; cds9k_fan0: cds9k-fan@4 { compatible = "david,cds9k-fan"; status = "okay"; reg = <0x4>; }; // ... cds9k_led0: cds9k-led@6 { compatible = "david,cds9k-led"; status = "okay"; reg = <0x6>; color = ; function = LED_FUNCTION_DEBUG; }; // ... cds9k_gpio0: cds9k-gpio@8 { compatible = "david,cds9k-gpio"; status = "okay"; reg = <0x8>; gpio-controller; #gpio-cells = <2>; }; cds9k_gpio1: cds9k-gpio@a { compatible = "david,cds9k-gpio"; status = "okay"; reg = <0xa>; gpio-controller; #gpio-cells = <2>; }; }; };