it87.c (27eb2c4b3d3e13f376a359e293c212a2e9407af5) | it87.c (a8b3a3a53f9a814e9938ea9cc179086ff5c0a387) |
---|---|
1/* 2 * it87.c - Part of lm_sensors, Linux kernel modules for hardware 3 * monitoring. 4 * 5 * The IT8705F is an LPC-based Super I/O part that contains UARTs, a 6 * parallel port, an IR port, a MIDI port, a floppy controller, etc., in 7 * addition to an Environment Controller (Enhanced Hardware Monitor and 8 * Fan Controller) --- 1948 unchanged lines hidden (view full) --- 1957exit: 1958 superio_exit(); 1959 return err; 1960} 1961 1962static void it87_remove_files(struct device *dev) 1963{ 1964 struct it87_data *data = platform_get_drvdata(pdev); | 1/* 2 * it87.c - Part of lm_sensors, Linux kernel modules for hardware 3 * monitoring. 4 * 5 * The IT8705F is an LPC-based Super I/O part that contains UARTs, a 6 * parallel port, an IR port, a MIDI port, a floppy controller, etc., in 7 * addition to an Environment Controller (Enhanced Hardware Monitor and 8 * Fan Controller) --- 1948 unchanged lines hidden (view full) --- 1957exit: 1958 superio_exit(); 1959 return err; 1960} 1961 1962static void it87_remove_files(struct device *dev) 1963{ 1964 struct it87_data *data = platform_get_drvdata(pdev); |
1965 struct it87_sio_data *sio_data = dev->platform_data; | 1965 struct it87_sio_data *sio_data = dev_get_platdata(dev); |
1966 int i; 1967 1968 sysfs_remove_group(&dev->kobj, &it87_group); 1969 for (i = 0; i < 9; i++) { 1970 if (sio_data->skip_in & (1 << i)) 1971 continue; 1972 sysfs_remove_group(&dev->kobj, &it87_group_in[i]); 1973 if (it87_attributes_in_beep[i]) --- 35 unchanged lines hidden (view full) --- 2009 sysfs_remove_group(&dev->kobj, &it87_group_label); 2010} 2011 2012static int it87_probe(struct platform_device *pdev) 2013{ 2014 struct it87_data *data; 2015 struct resource *res; 2016 struct device *dev = &pdev->dev; | 1966 int i; 1967 1968 sysfs_remove_group(&dev->kobj, &it87_group); 1969 for (i = 0; i < 9; i++) { 1970 if (sio_data->skip_in & (1 << i)) 1971 continue; 1972 sysfs_remove_group(&dev->kobj, &it87_group_in[i]); 1973 if (it87_attributes_in_beep[i]) --- 35 unchanged lines hidden (view full) --- 2009 sysfs_remove_group(&dev->kobj, &it87_group_label); 2010} 2011 2012static int it87_probe(struct platform_device *pdev) 2013{ 2014 struct it87_data *data; 2015 struct resource *res; 2016 struct device *dev = &pdev->dev; |
2017 struct it87_sio_data *sio_data = dev->platform_data; | 2017 struct it87_sio_data *sio_data = dev_get_platdata(dev); |
2018 int err = 0, i; 2019 int enable_pwm_interface; 2020 int fan_beep_need_rw; 2021 2022 res = platform_get_resource(pdev, IORESOURCE_IO, 0); 2023 if (!devm_request_region(&pdev->dev, res->start, IT87_EC_EXTENT, 2024 DRVNAME)) { 2025 dev_err(dev, "Failed to request region 0x%lx-0x%lx\n", --- 285 unchanged lines hidden (view full) --- 2311 } 2312 2313 return 1; 2314} 2315 2316/* Called when we have found a new IT87. */ 2317static void it87_init_device(struct platform_device *pdev) 2318{ | 2018 int err = 0, i; 2019 int enable_pwm_interface; 2020 int fan_beep_need_rw; 2021 2022 res = platform_get_resource(pdev, IORESOURCE_IO, 0); 2023 if (!devm_request_region(&pdev->dev, res->start, IT87_EC_EXTENT, 2024 DRVNAME)) { 2025 dev_err(dev, "Failed to request region 0x%lx-0x%lx\n", --- 285 unchanged lines hidden (view full) --- 2311 } 2312 2313 return 1; 2314} 2315 2316/* Called when we have found a new IT87. */ 2317static void it87_init_device(struct platform_device *pdev) 2318{ |
2319 struct it87_sio_data *sio_data = pdev->dev.platform_data; | 2319 struct it87_sio_data *sio_data = dev_get_platdata(&pdev->dev); |
2320 struct it87_data *data = platform_get_drvdata(pdev); 2321 int tmp, i; 2322 u8 mask; 2323 2324 /* 2325 * For each PWM channel: 2326 * - If it is in automatic mode, setting to manual mode should set 2327 * the fan to full speed by default. --- 306 unchanged lines hidden --- | 2320 struct it87_data *data = platform_get_drvdata(pdev); 2321 int tmp, i; 2322 u8 mask; 2323 2324 /* 2325 * For each PWM channel: 2326 * - If it is in automatic mode, setting to manual mode should set 2327 * the fan to full speed by default. --- 306 unchanged lines hidden --- |