Skip to content

Commit

Permalink
Merge tag 'staging-6.10-rc1' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here is the big set of staging driver changes for 6.10-rc1. Not a lot
  of cleanups happening this kernel release, intern applications must be
  out of sync at the moment. But we did delete two drivers, wlan-ng and
  pi433, as they are no longer in use and the developers involved wanted
  them just gone entirely, allowing us to drop 19k lines from the tree.

  Other than the normal coding style cleanups here, there has been a lot
  of work on the vc04_services code, with the intent to finally get that
  out of staging hopefully soon. It's getting closer, which is nice to
  see.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'staging-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (98 commits)
  staging: pi433: Remove unused driver
  staging: vchiq_core: Add missing blank lines
  staging: vchiq_core: Drop unnecessary blank lines
  staging: vchiq_core: Add parentheses to VCHIQ_MSG_SRCPORT
  staging: vchiq_core: Use printk messages for devices
  staging: vchiq_arm: Drop unnecessary NULL check
  staging: vc04_services: Delete unnecessary NULL check
  staging: vc04_services: vchiq_arm: Fix NULL ptr dereferences
  Staging: rtl8192e: Rename variable DssCCk
  Staging: rtl8192e: Rename variable ExtHTCapInfo
  Staging: rtl8192e: Rename variable MPDUDensity
  Staging: rtl8192e: Rename variable MaxRxAMPDUFactor
  Staging: rtl8192e: Rename variable MaxAMSDUSize
  Staging: rtl8192e: Rename variable DelayBA
  Staging: rtl8192e: Rename variable RxSTBC
  Staging: rtl8192e: Rename variable TxSTBC
  Staging: rtl8192e: Rename variable GreenField
  Staging: rtl8192e: Rename variable ShortGI20Mhz
  Staging: rtl8192e: Rename variable ShortGI40Mhz
  Staging: rtl8192e: Rename variable MimoPwrSave
  ...
  • Loading branch information
Linus Torvalds committed May 22, 2024
2 parents f6b8e86 + eb563dc commit be81389
Show file tree
Hide file tree
Showing 98 changed files with 533 additions and 19,333 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -21241,7 +21241,7 @@ S: Maintained
F: drivers/staging/sm750fb/

STAGING - VIA VT665X DRIVERS
M: Forest Bond <forest@alittletooquiet.net>
M: Philipp Hortmann <philipp.g.hortmann@gmail.com>
S: Odd Fixes
F: drivers/staging/vt665?/

Expand Down
4 changes: 0 additions & 4 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ menuconfig STAGING

if STAGING

source "drivers/staging/wlan-ng/Kconfig"

source "drivers/staging/olpc_dcon/Kconfig"

source "drivers/staging/rtl8192e/Kconfig"
Expand Down Expand Up @@ -62,8 +60,6 @@ source "drivers/staging/greybus/Kconfig"

source "drivers/staging/vc04_services/Kconfig"

source "drivers/staging/pi433/Kconfig"

source "drivers/staging/axis-fifo/Kconfig"

source "drivers/staging/fieldbus/Kconfig"
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Makefile for staging directory

obj-y += media/
obj-$(CONFIG_PRISM2_USB) += wlan-ng/
obj-$(CONFIG_FB_OLPC_DCON) += olpc_dcon/
obj-$(CONFIG_RTL8192E) += rtl8192e/
obj-$(CONFIG_RTL8723BS) += rtl8723bs/
Expand All @@ -21,6 +20,5 @@ obj-$(CONFIG_MOST) += most/
obj-$(CONFIG_KS7010) += ks7010/
obj-$(CONFIG_GREYBUS) += greybus/
obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/
obj-$(CONFIG_PI433) += pi433/
obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/
obj-$(CONFIG_FIELDBUS_DEV) += fieldbus/
10 changes: 5 additions & 5 deletions drivers/staging/axis-fifo/axis-fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
*/
mutex_lock(&fifo->read_lock);
ret = wait_event_interruptible_timeout(fifo->read_queue,
ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
read_timeout);
ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
read_timeout);

if (ret <= 0) {
if (ret == 0) {
Expand Down Expand Up @@ -517,9 +517,9 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
*/
mutex_lock(&fifo->write_lock);
ret = wait_event_interruptible_timeout(fifo->write_queue,
ioread32(fifo->base_addr + XLLF_TDFV_OFFSET)
>= words_to_write,
write_timeout);
ioread32(fifo->base_addr + XLLF_TDFV_OFFSET)
>= words_to_write,
write_timeout);

if (ret <= 0) {
if (ret == 0) {
Expand Down
7 changes: 3 additions & 4 deletions drivers/staging/fbtft/fb_seps525.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
* GNU General Public License for more details.
*/

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/gpio.h>
#include <linux/bits.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/module.h>

#include "fbtft.h"

Expand Down
1 change: 1 addition & 0 deletions drivers/staging/greybus/arche-apb-ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ static const struct of_device_id arche_apb_ctrl_of_match[] = {
{ .compatible = "usbffff,2", },
{ },
};
MODULE_DEVICE_TABLE(of, arche_apb_ctrl_of_match);

static struct platform_driver arche_apb_ctrl_device_driver = {
.probe = arche_apb_ctrl_probe,
Expand Down
9 changes: 1 addition & 8 deletions drivers/staging/greybus/arche-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,14 +619,7 @@ static const struct of_device_id arche_platform_of_match[] = {
{ .compatible = "google,arche-platform", },
{ },
};

static const struct of_device_id arche_combined_id[] = {
/* Use PID/VID of SVC device */
{ .compatible = "google,arche-platform", },
{ .compatible = "usbffff,2", },
{ },
};
MODULE_DEVICE_TABLE(of, arche_combined_id);
MODULE_DEVICE_TABLE(of, arche_platform_of_match);

static struct platform_driver arche_platform_device_driver = {
.probe = arche_platform_probe,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/greybus/audio_manager_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static struct attribute *gb_audio_module_default_attrs[] = {
};
ATTRIBUTE_GROUPS(gb_audio_module_default);

static struct kobj_type gb_audio_module_type = {
static const struct kobj_type gb_audio_module_type = {
.sysfs_ops = &gb_audio_module_sysfs_ops,
.release = gb_audio_module_release,
.default_groups = gb_audio_module_default_groups,
Expand Down
58 changes: 27 additions & 31 deletions drivers/staging/greybus/camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,6 @@ static const struct gb_camera_fmt_info *gb_camera_get_format_info(u16 gb_fmt)

#define GB_CAMERA_MAX_SETTINGS_SIZE 8192

#define gcam_dbg(gcam, format...) dev_dbg(&gcam->bundle->dev, format)
#define gcam_info(gcam, format...) dev_info(&gcam->bundle->dev, format)
#define gcam_err(gcam, format...) dev_err(&gcam->bundle->dev, format)

static int gb_camera_operation_sync_flags(struct gb_connection *connection,
int type, unsigned int flags,
void *request, size_t request_size,
Expand Down Expand Up @@ -232,27 +228,27 @@ static int gb_camera_get_max_pkt_size(struct gb_camera *gcam,

fmt_info = gb_camera_get_format_info(cfg->format);
if (!fmt_info) {
gcam_err(gcam, "unsupported greybus image format: %d\n",
cfg->format);
dev_err(&gcam->bundle->dev, "unsupported greybus image format: %d\n",
cfg->format);
return -EIO;
}

if (fmt_info->bpp == 0) {
pkt_size = le32_to_cpu(cfg->max_pkt_size);

if (pkt_size == 0) {
gcam_err(gcam,
"Stream %u: invalid zero maximum packet size\n",
i);
dev_err(&gcam->bundle->dev,
"Stream %u: invalid zero maximum packet size\n",
i);
return -EIO;
}
} else {
pkt_size = le16_to_cpu(cfg->width) * fmt_info->bpp / 8;

if (pkt_size != le32_to_cpu(cfg->max_pkt_size)) {
gcam_err(gcam,
"Stream %u: maximum packet size mismatch (%u/%u)\n",
i, pkt_size, cfg->max_pkt_size);
dev_err(&gcam->bundle->dev,
"Stream %u: maximum packet size mismatch (%u/%u)\n",
i, pkt_size, cfg->max_pkt_size);
return -EIO;
}
}
Expand All @@ -275,21 +271,21 @@ static const int gb_camera_configure_streams_validate_response(struct gb_camera

/* Validate the returned response structure */
if (resp->padding[0] || resp->padding[1]) {
gcam_err(gcam, "response padding != 0\n");
dev_err(&gcam->bundle->dev, "response padding != 0\n");
return -EIO;
}

if (resp->num_streams > nstreams) {
gcam_err(gcam, "got #streams %u > request %u\n",
resp->num_streams, nstreams);
dev_err(&gcam->bundle->dev, "got #streams %u > request %u\n",
resp->num_streams, nstreams);
return -EIO;
}

for (i = 0; i < resp->num_streams; i++) {
struct gb_camera_stream_config_response *cfg = &resp->config[i];

if (cfg->padding) {
gcam_err(gcam, "stream #%u padding != 0\n", i);
dev_err(&gcam->bundle->dev, "stream #%u padding != 0\n", i);
return -EIO;
}
}
Expand Down Expand Up @@ -340,16 +336,16 @@ static int gb_camera_set_power_mode(struct gb_camera *gcam, bool hs)

ret = gb_camera_set_intf_power_mode(gcam, intf->interface_id, hs);
if (ret < 0) {
gcam_err(gcam, "failed to set module interface to %s (%d)\n",
hs ? "HS" : "PWM", ret);
dev_err(&gcam->bundle->dev, "failed to set module interface to %s (%d)\n",
hs ? "HS" : "PWM", ret);
return ret;
}

ret = gb_camera_set_intf_power_mode(gcam, svc->ap_intf_id, hs);
if (ret < 0) {
gb_camera_set_intf_power_mode(gcam, intf->interface_id, !hs);
gcam_err(gcam, "failed to set AP interface to %s (%d)\n",
hs ? "HS" : "PWM", ret);
dev_err(&gcam->bundle->dev, "failed to set AP interface to %s (%d)\n",
hs ? "HS" : "PWM", ret);
return ret;
}

Expand Down Expand Up @@ -435,7 +431,7 @@ static int gb_camera_setup_data_connection(struct gb_camera *gcam,
sizeof(csi_cfg),
GB_APB_REQUEST_CSI_TX_CONTROL, false);
if (ret < 0) {
gcam_err(gcam, "failed to start the CSI transmitter\n");
dev_err(&gcam->bundle->dev, "failed to start the CSI transmitter\n");
goto error_power;
}

Expand Down Expand Up @@ -470,7 +466,7 @@ static void gb_camera_teardown_data_connection(struct gb_camera *gcam)
GB_APB_REQUEST_CSI_TX_CONTROL, false);

if (ret < 0)
gcam_err(gcam, "failed to stop the CSI transmitter\n");
dev_err(&gcam->bundle->dev, "failed to stop the CSI transmitter\n");

/* Set the UniPro link to low speed mode. */
gb_camera_set_power_mode(gcam, false);
Expand Down Expand Up @@ -507,7 +503,7 @@ static int gb_camera_capabilities(struct gb_camera *gcam,
NULL, 0,
(void *)capabilities, size);
if (ret)
gcam_err(gcam, "failed to retrieve capabilities: %d\n", ret);
dev_err(&gcam->bundle->dev, "failed to retrieve capabilities: %d\n", ret);

done:
mutex_unlock(&gcam->mutex);
Expand Down Expand Up @@ -723,22 +719,22 @@ static int gb_camera_request_handler(struct gb_operation *op)
struct gb_message *request;

if (op->type != GB_CAMERA_TYPE_METADATA) {
gcam_err(gcam, "Unsupported unsolicited event: %u\n", op->type);
dev_err(&gcam->bundle->dev, "Unsupported unsolicited event: %u\n", op->type);
return -EINVAL;
}

request = op->request;

if (request->payload_size < sizeof(*payload)) {
gcam_err(gcam, "Wrong event size received (%zu < %zu)\n",
request->payload_size, sizeof(*payload));
dev_err(&gcam->bundle->dev, "Wrong event size received (%zu < %zu)\n",
request->payload_size, sizeof(*payload));
return -EINVAL;
}

payload = request->payload;

gcam_dbg(gcam, "received metadata for request %u, frame %u, stream %u\n",
payload->request_id, payload->frame_number, payload->stream);
dev_dbg(&gcam->bundle->dev, "received metadata for request %u, frame %u, stream %u\n",
payload->request_id, payload->frame_number, payload->stream);

return 0;
}
Expand Down Expand Up @@ -1347,15 +1343,15 @@ static int gb_camera_resume(struct device *dev)

ret = gb_connection_enable(gcam->connection);
if (ret) {
gcam_err(gcam, "failed to enable connection: %d\n", ret);
dev_err(&gcam->bundle->dev, "failed to enable connection: %d\n", ret);
return ret;
}

if (gcam->data_connection) {
ret = gb_connection_enable(gcam->data_connection);
if (ret) {
gcam_err(gcam,
"failed to enable data connection: %d\n", ret);
dev_err(&gcam->bundle->dev,
"failed to enable data connection: %d\n", ret);
return ret;
}
}
Expand Down
12 changes: 5 additions & 7 deletions drivers/staging/greybus/fw-management.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ static int fw_mgmt_interface_fw_version_operation(struct fw_mgmt *fw_mgmt,
fw_info->major = le16_to_cpu(response.major);
fw_info->minor = le16_to_cpu(response.minor);

strncpy(fw_info->firmware_tag, response.firmware_tag,
GB_FIRMWARE_TAG_MAX_SIZE);
strscpy_pad(fw_info->firmware_tag, response.firmware_tag);

/*
* The firmware-tag should be NULL terminated, otherwise throw error but
Expand Down Expand Up @@ -153,7 +152,7 @@ static int fw_mgmt_load_and_validate_operation(struct fw_mgmt *fw_mgmt,
}

request.load_method = load_method;
strncpy(request.firmware_tag, tag, GB_FIRMWARE_TAG_MAX_SIZE);
strscpy_pad(request.firmware_tag, tag);

/*
* The firmware-tag should be NULL terminated, otherwise throw error and
Expand Down Expand Up @@ -249,8 +248,7 @@ static int fw_mgmt_backend_fw_version_operation(struct fw_mgmt *fw_mgmt,
struct gb_fw_mgmt_backend_fw_version_response response;
int ret;

strncpy(request.firmware_tag, fw_info->firmware_tag,
GB_FIRMWARE_TAG_MAX_SIZE);
strscpy_pad(request.firmware_tag, fw_info->firmware_tag);

/*
* The firmware-tag should be NULL terminated, otherwise throw error and
Expand Down Expand Up @@ -303,13 +301,13 @@ static int fw_mgmt_backend_fw_update_operation(struct fw_mgmt *fw_mgmt,
struct gb_fw_mgmt_backend_fw_update_request request;
int ret;

strncpy(request.firmware_tag, tag, GB_FIRMWARE_TAG_MAX_SIZE);
ret = strscpy_pad(request.firmware_tag, tag);

/*
* The firmware-tag should be NULL terminated, otherwise throw error and
* fail.
*/
if (request.firmware_tag[GB_FIRMWARE_TAG_MAX_SIZE - 1] != '\0') {
if (ret == -E2BIG) {
dev_err(fw_mgmt->parent, "backend-update: firmware-tag is not NULL terminated\n");
return -EINVAL;
}
Expand Down
8 changes: 7 additions & 1 deletion drivers/staging/greybus/light.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ static int __gb_lights_flash_brightness_set(struct gb_channel *channel)
channel = get_channel_from_mode(channel->light,
GB_CHANNEL_MODE_TORCH);

if (!channel)
return -EINVAL;

/* For not flash we need to convert brightness to intensity */
intensity = channel->intensity_uA.min +
(channel->intensity_uA.step * channel->led->brightness);
Expand Down Expand Up @@ -528,7 +531,10 @@ static int gb_lights_light_v4l2_register(struct gb_light *light)
}

channel_flash = get_channel_from_mode(light, GB_CHANNEL_MODE_FLASH);
WARN_ON(!channel_flash);
if (!channel_flash) {
dev_err(dev, "failed to get flash channel from mode\n");
return -EINVAL;
}

fled = &channel_flash->fled;

Expand Down
1 change: 1 addition & 0 deletions drivers/staging/greybus/loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ struct gb_loopback {
static struct class loopback_class = {
.name = "gb_loopback",
};

static DEFINE_IDA(loopback_ida);

/* Min/max values in jiffies */
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/ks7010/ks7010_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ static struct sdio_driver ks7010_sdio_driver = {
.remove = ks7010_sdio_remove,
};

module_driver(ks7010_sdio_driver, sdio_register_driver, sdio_unregister_driver);
module_sdio_driver(ks7010_sdio_driver);
MODULE_AUTHOR("Sang Engineering, Qi-Hardware, KeyStream");
MODULE_DESCRIPTION("Driver for KeyStream KS7010 based SDIO cards");
MODULE_LICENSE("GPL v2");
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/nvec/TODO
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ToDo list (incomplete, unordered)
- move the driver to the new i2c slave framework
- finish suspend/resume support
- fix udelay in the isr
- add atomic ops in order to fix shutoff/reboot problems
Loading

0 comments on commit be81389

Please sign in to comment.