| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Support for power management features of the OLPC XO-1 laptop |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * Copyright (C) 2010 One Laptop per Child |
|---|
| 6 | 7 | * Copyright (C) 2006 Red Hat, Inc. |
|---|
| 7 | 8 | * Copyright (C) 2006 Advanced Micro Devices, Inc. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 11 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 12 | | - * (at your option) any later version. |
|---|
| 13 | 9 | */ |
|---|
| 14 | 10 | |
|---|
| 15 | 11 | #include <linux/cs5535.h> |
|---|
| 16 | 12 | #include <linux/platform_device.h> |
|---|
| 17 | 13 | #include <linux/export.h> |
|---|
| 18 | 14 | #include <linux/pm.h> |
|---|
| 19 | | -#include <linux/mfd/core.h> |
|---|
| 20 | 15 | #include <linux/suspend.h> |
|---|
| 21 | 16 | #include <linux/olpc-ec.h> |
|---|
| 22 | 17 | |
|---|
| .. | .. |
|---|
| 124 | 119 | static int xo1_pm_probe(struct platform_device *pdev) |
|---|
| 125 | 120 | { |
|---|
| 126 | 121 | struct resource *res; |
|---|
| 127 | | - int err; |
|---|
| 128 | 122 | |
|---|
| 129 | 123 | /* don't run on non-XOs */ |
|---|
| 130 | 124 | if (!machine_is_olpc()) |
|---|
| 131 | 125 | return -ENODEV; |
|---|
| 132 | | - |
|---|
| 133 | | - err = mfd_cell_enable(pdev); |
|---|
| 134 | | - if (err) |
|---|
| 135 | | - return err; |
|---|
| 136 | 126 | |
|---|
| 137 | 127 | res = platform_get_resource(pdev, IORESOURCE_IO, 0); |
|---|
| 138 | 128 | if (!res) { |
|---|
| .. | .. |
|---|
| 156 | 146 | |
|---|
| 157 | 147 | static int xo1_pm_remove(struct platform_device *pdev) |
|---|
| 158 | 148 | { |
|---|
| 159 | | - mfd_cell_disable(pdev); |
|---|
| 160 | | - |
|---|
| 161 | 149 | if (strcmp(pdev->name, "cs5535-pms") == 0) |
|---|
| 162 | 150 | pms_base = 0; |
|---|
| 163 | 151 | else if (strcmp(pdev->name, "olpc-xo1-pm-acpi") == 0) |
|---|