summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/tosa-bt.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2022-09-29 15:24:20 +0200
committerArnd Bergmann <arnd@arndb.de>2023-01-20 11:23:44 +0100
commitd6df7df7ae5a0f781341134e7cb24e3396f8434a (patch)
treec98fb7e4f4c740d4045ab6961e8208dda63f1699 /arch/arm/mach-pxa/tosa-bt.c
parenteede0a75b96c7cfc3a61a4b01dd3674e8742039f (diff)
ARM: pxa: remove unused board files
The majority of all pxa board files has not been touched in a long time, and no users have spoken up in favor of keeping them around. This leaves only support for the platforms that were already converted to DT, as well as the gumstix and spitz/akita/borzoi machines that work in qemu and can still be converted to DT later. Cc: Ales Bardorfer <ales@i-tech.si> Cc: Ales Snuparek <snuparek@atlas.cz> Cc: Alex Osborne <ato@meshy.org> Cc: Alex Osborne <bobofdoom@gmail.com> Cc: Dirk Opfer <dirk@opfer-online.de> Cc: Ian Molton <spyro@f2s.com> Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Michael Petchkovsky <mkpetch@internode.on.net> Cc: Nick Bane <nick@cecomputing.co.uk> Cc: Paul Parsons <lost.distance@yahoo.com> Cc: Philipp Zabel <philipp.zabel@gmail.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Sergey Lapin <slapin@ossfans.org> Cc: Tomas Cech <sleep_walker@suse.cz> Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-pxa/tosa-bt.c')
-rw-r--r--arch/arm/mach-pxa/tosa-bt.c134
1 files changed, 0 insertions, 134 deletions
diff --git a/arch/arm/mach-pxa/tosa-bt.c b/arch/arm/mach-pxa/tosa-bt.c
deleted file mode 100644
index c9541632b8b1..000000000000
--- a/arch/arm/mach-pxa/tosa-bt.c
+++ /dev/null
@@ -1,134 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Bluetooth built-in chip control
- *
- * Copyright (c) 2008 Dmitry Baryshkov
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/gpio.h>
-#include <linux/delay.h>
-#include <linux/rfkill.h>
-
-#include "tosa_bt.h"
-
-static void tosa_bt_on(struct tosa_bt_data *data)
-{
- gpio_set_value(data->gpio_reset, 0);
- gpio_set_value(data->gpio_pwr, 1);
- gpio_set_value(data->gpio_reset, 1);
- mdelay(20);
- gpio_set_value(data->gpio_reset, 0);
-}
-
-static void tosa_bt_off(struct tosa_bt_data *data)
-{
- gpio_set_value(data->gpio_reset, 1);
- mdelay(10);
- gpio_set_value(data->gpio_pwr, 0);
- gpio_set_value(data->gpio_reset, 0);
-}
-
-static int tosa_bt_set_block(void *data, bool blocked)
-{
- pr_info("BT_RADIO going: %s\n", blocked ? "off" : "on");
-
- if (!blocked) {
- pr_info("TOSA_BT: going ON\n");
- tosa_bt_on(data);
- } else {
- pr_info("TOSA_BT: going OFF\n");
- tosa_bt_off(data);
- }
-
- return 0;
-}
-
-static const struct rfkill_ops tosa_bt_rfkill_ops = {
- .set_block = tosa_bt_set_block,
-};
-
-static int tosa_bt_probe(struct platform_device *dev)
-{
- int rc;
- struct rfkill *rfk;
-
- struct tosa_bt_data *data = dev->dev.platform_data;
-
- rc = gpio_request(data->gpio_reset, "Bluetooth reset");
- if (rc)
- goto err_reset;
- rc = gpio_direction_output(data->gpio_reset, 0);
- if (rc)
- goto err_reset_dir;
- rc = gpio_request(data->gpio_pwr, "Bluetooth power");
- if (rc)
- goto err_pwr;
- rc = gpio_direction_output(data->gpio_pwr, 0);
- if (rc)
- goto err_pwr_dir;
-
- rfk = rfkill_alloc("tosa-bt", &dev->dev, RFKILL_TYPE_BLUETOOTH,
- &tosa_bt_rfkill_ops, data);
- if (!rfk) {
- rc = -ENOMEM;
- goto err_rfk_alloc;
- }
-
- rc = rfkill_register(rfk);
- if (rc)
- goto err_rfkill;
-
- platform_set_drvdata(dev, rfk);
-
- return 0;
-
-err_rfkill:
- rfkill_destroy(rfk);
-err_rfk_alloc:
- tosa_bt_off(data);
-err_pwr_dir:
- gpio_free(data->gpio_pwr);
-err_pwr:
-err_reset_dir:
- gpio_free(data->gpio_reset);
-err_reset:
- return rc;
-}
-
-static int tosa_bt_remove(struct platform_device *dev)
-{
- struct tosa_bt_data *data = dev->dev.platform_data;
- struct rfkill *rfk = platform_get_drvdata(dev);
-
- platform_set_drvdata(dev, NULL);
-
- if (rfk) {
- rfkill_unregister(rfk);
- rfkill_destroy(rfk);
- }
- rfk = NULL;
-
- tosa_bt_off(data);
-
- gpio_free(data->gpio_pwr);
- gpio_free(data->gpio_reset);
-
- return 0;
-}
-
-static struct platform_driver tosa_bt_driver = {
- .probe = tosa_bt_probe,
- .remove = tosa_bt_remove,
-
- .driver = {
- .name = "tosa-bt",
- },
-};
-module_platform_driver(tosa_bt_driver);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Dmitry Baryshkov");
-MODULE_DESCRIPTION("Bluetooth built-in chip control");